﻿/* Arkib Seni gallery overlay */
.lobby-title,
.enter-title,
.gallery-kicker h2,
.gallery-work-title,
.gallery-art-mark .art-title {
  font-family: 'Cormorant Garamond', serif;
}

.enter-sub,
.gallery-work-caption {
  font-family: 'Lora', serif;
}

.hint {
  font-family: 'Manrope', sans-serif;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  max-height: none;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  background: rgba(4, 2, 1, 0.94);
  backdrop-filter: blur(16px) saturate(1.15);
  padding: 24px;
}

.gallery-modal.is-open {
  display: flex;
}

.gallery-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100vw - 18px));
  height: min(calc(100vh - 48px), 880px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(239, 222, 188, 0.14);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 235, 182, 0.08) 0%, transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(255, 214, 126, 0.06) 0%, transparent 24%),
    linear-gradient(180deg, rgba(10, 7, 5, 0.96) 0%, rgba(5, 3, 2, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 245, 220, 0.04),
    0 32px 80px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gallery-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 18%, rgba(255, 228, 160, 0.12) 0%, transparent 42%);
  pointer-events: none;
}

.gallery-shell::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.24) 100%);
  pointer-events: none;
}

.gallery-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
}

.gallery-kicker {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.gallery-kicker small {
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(232, 207, 150, 0.55);
  font-size: 0.53rem;
}

.gallery-kicker h2 {
  font-size: clamp(1.25rem, 2.3vw, 1.9rem);
  letter-spacing: 1.6px;
  color: #f7efda;
  line-height: 1.05;
  text-transform: uppercase;
}

 .gallery-title-sub {
   display: none;
 }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Gallery topbar controls ── */
.gallery-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  background: rgba(8,5,2,.55);
  border: 1px solid rgba(200,148,30,.13);
  border-radius: 12px;
  padding: 4px 5px;
  backdrop-filter: blur(14px);
}

.gallery-nav-pair,
.gallery-action-pair {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  gap: 1px;
}

/* thin amber separator after nav group */
.gallery-nav-pair::after {
  content: '';
  display: block;
  width: 1px;
  height: 14px;
  background: rgba(200,148,30,.2);
  margin: 0 4px;
}

.gallery-action-pair:empty,
.gallery-action-pair:not(:has(button:not([hidden]))) {
  display: none;
}

/* separator before close button */
.gallery-close-sep {
  display: block;
  width: 1px;
  height: 14px;
  background: rgba(200,148,30,.2);
  margin: 0 4px;
}

.gallery-icon-btn {
  width: 30px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(200,155,50,.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.gallery-icon-btn:hover {
  background: rgba(200,148,30,.13);
  color: rgba(245,205,80,.95);
}

.gallery-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(200,155,50,.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.gallery-close:hover {
  background: rgba(160,50,50,.2);
  color: rgba(255,170,170,.9);
}

.gallery-rail {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-rail.is-fading { opacity: 0; }

.gallery-rail::-webkit-scrollbar {
  display: none;
  max-height: none;
  overflow: hidden;
}

.gallery-slide {
  flex: 0 0 100%;
  min-height: 0;
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 18px;
  padding: 8px 20px 28px;
  align-items: stretch;
}

.gallery-stage {
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  max-height: min(calc(100vh - 160px), 720px);
}

.gallery-light {
  position: absolute;
  inset: 12% 14% auto;
  height: 50%;
  background: radial-gradient(ellipse at top center, rgba(255, 228, 160, 0.24) 0%, rgba(255, 228, 160, 0.08) 26%, transparent 72%);
  filter: blur(14px);
  pointer-events: none;
}

.gallery-frame {
  position: relative;
  width: min(100%, 720px);
  height: 100%;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(200,148,30,.22);
  background:
    radial-gradient(ellipse 70% 35% at 50% 0%, rgba(200,148,30,.08) 0%, transparent 55%),
    linear-gradient(180deg, rgba(14,8,4,.55) 0%, rgba(5,2,1,.7) 100%);
  box-shadow:
    0 0 0 1px rgba(255,240,200,.04),
    0 20px 60px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,220,100,.06);
  display: flex;
  flex-direction: column;
}

/* double-rule frame accent at top */
.gallery-frame::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 16px;
  border: 1px solid rgba(200,148,30,.10);
  pointer-events: none;
}

.gallery-art {
  position: relative;
  flex: 1;
  min-height: 120px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, var(--glow1, rgba(255, 220, 160, 0.18)) 0%, transparent 22%),
    radial-gradient(circle at 78% 24%, var(--glow2, rgba(180, 130, 60, 0.14)) 0%, transparent 24%),
    linear-gradient(160deg, var(--art-a, #6b4228) 0%, var(--art-b, #241510) 50%, var(--art-c, #0d0807) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Gold picture-frame ring */
  box-shadow:
    0 0 0 1px rgba(200,148,30,.35),
    0 0 0 3px rgba(14,8,4,.8),
    0 0 0 4px rgba(200,148,30,.18),
    0 8px 32px rgba(0,0,0,.5),
    inset 0 0 60px rgba(0,0,0,.18);
}

/* Spotlight from top */
.gallery-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% -5%, rgba(255,228,160,.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
}

/* Bottom shadow vignette */
.gallery-art::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.22) 100%);
  pointer-events: none;
  z-index: 1;
}

.gallery-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: clamp(28px, 5.5%, 52px);
  display: block;
  filter: saturate(1.25) sepia(0.06);
  z-index: 2;
  box-sizing: border-box;
}

.gallery-art-mark { display: none; }

.gallery-sidebar {
  min-width: 0;
  border-radius: 20px;
  border: 1px solid rgba(200, 148, 30, 0.14);
  background:
    radial-gradient(ellipse 100% 35% at 50% 0%, rgba(200,148,30,.09) 0%, transparent 60%),
    linear-gradient(180deg, rgba(12,6,2,.82) 0%, rgba(5,2,1,.92) 100%);
  box-shadow:
    0 14px 40px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,215,80,.05);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,148,30,.3) transparent;
}
.gallery-sidebar::-webkit-scrollbar { width: 3px; }
.gallery-sidebar::-webkit-scrollbar-track { background: transparent; }
.gallery-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,215,80,.4), rgba(200,148,30,.25));
  border-radius: 999px;
}

.gallery-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-breadcrumb {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200,148,30,.55);
}

.gallery-work-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 1.5px;
  color: #faf3e0;
  text-shadow:
    0 0 40px rgba(200,148,30,.22),
    0 2px 0 rgba(0,0,0,.55);
}
.gallery-work-title.title-long {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.gallery-work-caption {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: rgba(240, 230, 210, 0.82);
  line-height: 1.78;
}

@keyframes curatorIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes curatorShimmer {
  0%, 100% { height: 28px; box-shadow: none; opacity: .9; }
  50%       { height: 40px; box-shadow: 0 0 10px rgba(255,215,80,.35); opacity: 1; }
}
.gallery-curator-block {
  width: 100%;
  position: relative;
  border: none;
  border-left: 2px solid rgba(200,148,30,.45);
  background:
    linear-gradient(135deg, rgba(200,148,30,.07) 0%, rgba(160,100,10,.03) 100%);
  border-radius: 0 14px 14px 0;
  padding: 14px 16px 14px 18px;
  display: grid;
  gap: 8px;
  animation: curatorIn .5s ease both;
  animation-delay: .35s;
}
.gallery-curator-block::before {
  content: '';
  position: absolute;
  top: 0; left: -2px;
  width: 2px; height: 28px;
  background: linear-gradient(180deg, rgba(255,215,80,.95), rgba(200,148,30,.4));
  border-radius: 2px;
  animation: curatorShimmer 3s ease-in-out infinite;
}

.gallery-curator-block-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(240,200,80,.9);
  display: flex;
  align-items: center;
  gap: 10px;
}
.gallery-curator-block-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(200,148,30,.35), transparent);
}
.curator-star-tip {
  position: relative;
  cursor: help;
}
.curator-tip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: rgba(18,10,4,.96);
  border: 1px solid rgba(200,148,30,.28);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Lora', serif;
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(244,234,214,.88);
  line-height: 1.55;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  pointer-events: none;
  z-index: 10;
  white-space: normal;
}
.curator-tip-text::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(200,148,30,.28);
}
.curator-star-tip:hover .curator-tip-text { display: block; }

.curator-attribution {
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  font-style: normal;
  letter-spacing: 1.5px;
  color: rgba(255,215,80,.75);
  margin-right: 5px;
}
.gallery-curator-block p {
  margin: 0;
  color: rgba(245,235,215,.88);
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.65;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
  text-align: justify;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,148,30,.35) transparent;
}
.gallery-curator-block p::-webkit-scrollbar {
  width: 3px;
}
.gallery-curator-block p::-webkit-scrollbar-track {
  background: transparent;
}
.gallery-curator-block p::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,215,80,.5), rgba(200,148,30,.3));
  border-radius: 999px;
}
.gallery-curator-block p::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255,215,80,.8), rgba(200,148,30,.6));
}

.gallery-ai-star {
  font-size: 0.65em;
  vertical-align: super;
  margin-left: 6px;
  cursor: help;
  color: rgba(240,200,80,.8);
  text-shadow: 0 0 10px rgba(200,148,30,.5);
  position: relative;
  display: inline-block;
}

.gallery-ai-star::after {
  content: 'Nama dijana oleh AI';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(240,210,120,.95);
  background: rgba(10,6,2,.92);
  border: 1px solid rgba(200,148,30,.3);
  border-radius: 8px;
  padding: 5px 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 99;
  font-style: normal;
  text-shadow: none;
}

.gallery-ai-star:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.gallery-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(220,170,60,.82);
}

.gallery-facts span {
  position: relative;
  padding-right: 12px;
}

.gallery-facts span:not(:last-child)::after {
  content: "\2022";
  position: absolute;
  right: 0;
  top: 0;
  color: rgba(240, 224, 190, 0.35);
}

.gallery-facts--group { font-size: 0.63rem; letter-spacing: 1px; }

.gallery-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.gallery-edit-btn {
  border: 1px solid rgba(240, 224, 190, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #f8efd7;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.gallery-edit-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 236, 198, 0.28);
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.gallery-nav-group {
  display: flex;
  gap: 8px;
}

/* .gallery-nav-btn is now handled by .gallery-icon-btn */

.gallery-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.35px;
  color: rgba(240, 224, 190, 0.72);
  white-space: nowrap;
}

.gallery-count-icon {
  font-size: 0.55rem;
  opacity: 0.8;
}

.gallery-count-text {
  min-width: 1ch;
}

body.gallery-open .lyric-bar,
body.gallery-open .site-footer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ── Gallery Admin Wizard ── */
.gallery-admin {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 2, 1, 0.82);
  backdrop-filter: blur(14px) saturate(1.1);
  padding: 16px;
  z-index: 5;
}
.gallery-admin.is-open { display: flex; }

.gallery-admin-dialog {
  position: relative;
  width: min(520px, calc(100vw - 24px));
  max-height: min(92vh, 820px);
  border-radius: 24px;
  border: 1px solid rgba(240, 224, 190, 0.14);
  background: linear-gradient(160deg, rgba(12,7,4,.99) 0%, rgba(7,4,2,1) 100%);
  box-shadow: 0 48px 96px rgba(0,0,0,.56), 0 0 0 1px rgba(255,255,255,.025), inset 0 1px 0 rgba(255,230,150,.055);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 0;
  flex-shrink: 0;
}
.wiz-steps { display: flex; align-items: center; }
.wiz-panel[hidden],
.wiz-drop-preview[hidden],
.wiz-drop-idle[hidden],
.gallery-admin [hidden] { display: none !important; }
.wiz-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(240,224,190,.18);
  border: 1px solid rgba(240,224,190,.12);
  transition: background .3s, transform .3s, box-shadow .3s;
  flex-shrink: 0;
}
.wiz-dot.active {
  background: rgba(220,168,40,.9);
  border-color: rgba(255,210,80,.4);
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(220,168,40,.45);
}
.wiz-dot.done { background: rgba(160,120,30,.65); border-color: rgba(200,150,50,.28); }
.wiz-line { width: 30px; height: 1px; background: rgba(240,224,190,.13); flex-shrink: 0; }
.wiz-close-btn {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  background: transparent; color: rgba(200,155,50,.45);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, color .15s;
}
.wiz-close-btn:hover { background: rgba(160,50,50,.2); color: rgba(255,170,170,.9); }

.wiz-panel {
  flex: 1; overflow-y: auto; padding: 20px 22px 8px;
  display: flex; flex-direction: column; gap: 16px;
  animation: wizIn .22s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(232,207,150,.34) rgba(255,255,255,.04);
}
@keyframes wizIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wiz-panel-intro { display: flex; flex-direction: column; gap: 4px; }
.wiz-step-label {
  font-size: 0.6rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(220,168,40,.6); margin-bottom: 2px;
}
.wiz-panel h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem; font-weight: 600; letter-spacing: 1.4px;
  color: #f8efd7; margin: 0; line-height: 1.2;
}
.wiz-panel-intro > p {
  font-family: 'Lora', serif;
  color: rgba(240,230,210,.60); font-size: 0.83rem; line-height: 1.55; margin: 0;
}

.wiz-dropzone {
  border-radius: 18px;
  border: 1.5px dashed rgba(240,224,190,.18);
  background: rgba(255,255,255,.02);
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color .2s, background .2s; cursor: pointer;
}
.wiz-dropzone.drag-over { border-color: rgba(220,168,40,.55); background: rgba(220,168,40,.04); }
.wiz-dropzone.wiz-shake { animation: wizShake .45s ease; }
@keyframes wizShake {
  0%,100% { transform: none; }
  25%,75%  { transform: translateX(-5px); }
  50%      { transform: translateX(5px); }
}
.wiz-drop-idle {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 32px 24px; text-align: center; pointer-events: none;
}
.wiz-drop-idle > * { pointer-events: auto; }
.wiz-drop-icon { font-size: 2.2rem; color: rgba(220,168,40,.38); line-height: 1; }
.wiz-drop-hint { font-family: 'Lora', serif; color: rgba(240,224,190,.4); font-size: 0.83rem; margin: 0; }
.wiz-pick-btn {
  margin-top: 6px; padding: 9px 22px; border-radius: 12px;
  border: 1px solid rgba(240,224,190,.18); background: rgba(255,255,255,.05);
  color: rgba(248,239,215,.88); font-family: 'Manrope', sans-serif;
  font-size: 0.74rem; letter-spacing: 0.5px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.wiz-pick-btn:hover { background: rgba(220,168,40,.1); border-color: rgba(220,168,40,.32); }
.wiz-drop-preview {
  width: 100%; min-height: 200px; position: relative;
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.wiz-drop-preview img {
  max-width: 100%; max-height: 260px; object-fit: contain;
  display: block; border-radius: 10px;
  filter: saturate(1.25) sepia(0.06);
}
.wiz-remove-btn {
  position: absolute; top: 14px; right: 14px;
  width: 26px; height: 26px; border-radius: 8px; border: none;
  background: rgba(0,0,0,.65); color: rgba(255,190,190,.9);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.wiz-remove-btn:hover { background: rgba(160,40,40,.7); }

.wiz-form { display: flex; flex-direction: column; gap: 13px; }
.wiz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wiz-field { display: flex; flex-direction: column; gap: 6px; }
.wiz-field > span {
  font-size: 0.67rem; letter-spacing: 0.9px;
  color: rgba(240,224,190,.52); text-transform: uppercase;
}
.wiz-field > span em {
  font-style: normal; opacity: 0.65;
  text-transform: none; letter-spacing: 0; font-size: 0.9em;
}
.wiz-field input,
.wiz-field textarea {
  border-radius: 12px;
  border: 1px solid rgba(240,224,190,.11);
  background: rgba(255,255,255,.03);
  color: #f8efd7; padding: 10px 13px;
  font-family: 'Lora', serif; font-size: 0.89rem;
  outline: none; transition: border-color .2s;
  width: 100%; box-sizing: border-box;
}
.wiz-field input:focus, .wiz-field textarea:focus { border-color: rgba(220,168,40,.32); }
.wiz-field textarea { min-height: 78px; resize: vertical; }

.wiz-ai-row { display: flex; gap: 8px; align-items: stretch; }
.wiz-ai-row input { flex: 1; min-width: 0; }
.wiz-ai-row--caption { align-items: flex-start; }
.wiz-ai-row--caption textarea { flex: 1; min-width: 0; }
.wiz-ai-btn {
  flex-shrink: 0; padding: 0 16px; height: 41px; border-radius: 12px;
  border: 1px solid rgba(220,168,40,.28);
  background: linear-gradient(150deg, rgba(220,168,40,.13) 0%, rgba(130,95,18,.11) 100%);
  color: rgba(255,218,88,.92);
  font-family: 'Manrope', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.4px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s, border-color .2s, transform .18s, box-shadow .2s;
  white-space: nowrap;
}
.wiz-ai-btn:hover {
  background: linear-gradient(150deg, rgba(220,168,40,.22) 0%, rgba(155,112,22,.19) 100%);
  border-color: rgba(220,168,40,.48);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(180,130,20,.22);
}
.wiz-ai-btn.is-loading { opacity: 0.68; cursor: wait; transform: none; }
.wiz-ai-star { font-size: 0.88rem; opacity: 0.82; }
.wiz-ai-btn--top { align-self: flex-start; margin-top: 1px; }

.gallery-ai-loading {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 3, 2, 0.72);
  backdrop-filter: blur(10px) saturate(1.08);
}

.gallery-ai-loading[hidden] {
  display: none !important;
}

.gallery-ai-loading-card {
  width: min(340px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(240, 224, 190, 0.18);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 218, 88, 0.14) 0%, transparent 38%),
    linear-gradient(160deg, rgba(18, 11, 5, 0.98), rgba(8, 5, 3, 0.99));
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 240, 180, 0.06);
  padding: 26px 24px 24px;
  text-align: center;
}

.gallery-ai-lamp {
  position: relative;
  width: 86px;
  height: 70px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  animation: galleryLampFloat 2.4s ease-in-out infinite;
}

.gallery-ai-lamp::before {
  content: '';
  position: absolute;
  inset: -10px -18px -2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 218, 88, 0.24) 0%, rgba(220, 168, 40, 0.11) 44%, transparent 72%);
  filter: blur(2px);
  animation: galleryLampGlow 1.7s ease-in-out infinite;
}

.gallery-ai-lamp img {
  position: relative;
  z-index: 1;
  width: 82px;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.48))
    drop-shadow(0 0 18px rgba(220, 168, 40, 0.44));
}

.gallery-ai-lamp::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 66px;
  height: 9px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
  filter: blur(5px);
  animation: galleryLampShadow 2.4s ease-in-out infinite;
}

.gallery-ai-loading-kicker {
  font-family: 'Manrope', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(220, 168, 40, 0.72);
  margin-bottom: 8px;
}

.gallery-ai-loading-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  line-height: 1.16;
  color: #f8efd7;
}

.gallery-ai-loading-sub {
  margin: 10px auto 0;
  max-width: 280px;
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(240, 230, 210, 0.64);
}

@keyframes galleryLampFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1.5deg); }
}

@keyframes galleryLampGlow {
  0%, 100% { opacity: 0.58; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes galleryLampShadow {
  0%, 100% { opacity: 0.34; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.2; transform: translateX(-50%) scale(0.78); }
}

.wiz-curation {
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: 12px; min-height: 180px;
}
.wiz-curation-thumb {
  border-radius: 14px;
  border: 1px solid rgba(240,224,190,.12);
  background:
    radial-gradient(circle at 22% 18%, rgba(255,230,170,.15) 0%, transparent 26%),
    linear-gradient(135deg, rgba(124,90,67,.82) 0%, rgba(47,33,25,.94) 58%, rgba(19,13,9,.98) 100%);
  overflow: hidden; display: grid; place-items: center;
  color: rgba(248,239,215,.55); font-family: 'Lora', serif;
  font-size: 0.78rem; text-align: center; padding: 12px;
}
.wiz-curation-thumb.has-image { background-size: contain; background-position: center; background-repeat: no-repeat; color: transparent; }
.wiz-curation-body { display: flex; flex-direction: column; gap: 10px; }
.wiz-curation-btns { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.wiz-regen-btn {
  padding: 8px 13px; border-radius: 10px;
  border: 1px solid rgba(240,224,190,.13); background: rgba(255,255,255,.04);
  color: rgba(240,224,190,.72); font-family: 'Manrope', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.3px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.wiz-regen-btn:hover { background: rgba(255,255,255,.08); }
.wiz-regen-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.wiz-approve-btn {
  padding: 8px 15px; border-radius: 10px;
  border: 1px solid rgba(220,168,40,.24);
  background: linear-gradient(150deg, rgba(220,168,40,.11), rgba(130,95,18,.1));
  color: rgba(255,218,88,.9); font-family: 'Manrope', sans-serif;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.3px;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.wiz-approve-btn:disabled { opacity: 0.38; cursor: not-allowed; }
.wiz-approve-btn.is-active {
  border-color: rgba(220,168,40,.48);
  background: linear-gradient(150deg, rgba(220,168,40,.2), rgba(155,112,22,.17));
  box-shadow: 0 4px 14px rgba(180,130,20,.22);
}
.wiz-featured-btn {
  margin-top: 6px;
  padding: 7px 14px; border-radius: 10px;
  border: 1px solid rgba(240,224,190,.13); background: rgba(255,255,255,.03);
  color: rgba(240,224,190,.55); font-family: 'Manrope', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.3px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  width: 100%;
}
.wiz-featured-btn:hover { background: rgba(220,168,40,.08); border-color: rgba(220,168,40,.22); color: rgba(255,218,88,.7); }
.wiz-featured-btn.is-featured {
  border-color: rgba(220,168,40,.45);
  background: linear-gradient(150deg, rgba(220,168,40,.15), rgba(130,95,18,.12));
  color: rgba(255,218,88,.95);
  box-shadow: 0 3px 12px rgba(180,130,20,.18);
}

.gallery-curation-note {
  border-radius: 14px;
  border: 1px solid rgba(240,224,190,.09);
  background: rgba(255,255,255,.025);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; overflow: hidden;
}
.gallery-curation-label {
  font-size: 0.58rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: rgba(232,207,150,.5);
}
.gallery-curation-note p {
  margin: 0; color: rgba(244,234,214,.88);
  font-family: 'Lora', serif; font-size: 0.80rem;
  line-height: 1.6; text-align: justify;
  max-height: 160px; overflow-y: auto;
  padding-right: 4px; scrollbar-width: thin;
}
.gallery-curation-textarea {
  flex: 1; width: 100%; min-height: 130px; max-height: 180px;
  background: transparent; border: none; outline: none; resize: none;
  color: rgba(244,234,214,.88); font-family: 'Lora', serif;
  font-size: 0.80rem; line-height: 1.6; text-align: justify;
  padding: 0; scrollbar-width: thin;
  scrollbar-color: rgba(200,148,30,.3) transparent;
}
.gallery-curation-textarea::placeholder { color: rgba(244,234,214,.3); font-style: italic; }
.gallery-curation-textarea:disabled { opacity: 0.5; cursor: not-allowed; }

.wiz-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px 20px; gap: 10px;
  border-top: 1px solid rgba(240,224,190,.07);
  flex-shrink: 0;
}
.wiz-footer-right { display: flex; gap: 8px; align-items: center; }
.wiz-btn {
  padding: 9px 16px; border-radius: 12px;
  font-family: 'Manrope', sans-serif; font-size: 0.74rem;
  letter-spacing: 0.3px; cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s, box-shadow .18s, opacity .18s;
}
.wiz-btn--ghost {
  border: 1px solid rgba(240,224,190,.11);
  background: transparent; color: rgba(240,224,190,.52);
}
.wiz-btn--ghost:hover { background: rgba(255,255,255,.04); color: rgba(240,224,190,.8); border-color: rgba(240,224,190,.2); }
.wiz-btn--next {
  border: 1px solid rgba(240,224,190,.18);
  background: rgba(255,255,255,.06); color: #f8efd7;
}
.wiz-btn--next:hover { background: rgba(255,255,255,.1); border-color: rgba(240,224,190,.3); transform: translateX(2px); }
.wiz-btn--next:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.wiz-btn--publish {
  border: 1px solid rgba(220,168,40,.32);
  background: linear-gradient(150deg, rgba(220,168,40,.17) 0%, rgba(130,95,18,.14) 100%);
  color: rgba(255,218,88,.96); font-weight: 600;
}
.wiz-btn--publish:hover:not(:disabled) {
  background: linear-gradient(150deg, rgba(220,168,40,.26) 0%, rgba(155,112,22,.22) 100%);
  border-color: rgba(220,168,40,.52);
  box-shadow: 0 8px 24px rgba(180,130,20,.26);
}
.wiz-btn--publish:disabled { opacity: 0.38; cursor: not-allowed; }
.wiz-btn--danger {
  border: 1px solid rgba(211,102,102,.2);
  background: linear-gradient(150deg, rgba(127,37,37,.17), rgba(64,20,20,.18));
  color: #ffd7d7;
}
.wiz-btn--danger:hover { border-color: rgba(255,154,154,.34); background: linear-gradient(150deg, rgba(146,50,50,.22), rgba(78,24,24,.26)); }

@media (max-width: 600px) {
  .gallery-shell { height: min(calc(100vh - 32px), 900px); border-radius: 18px; }
  .gallery-topbar { padding: 14px 14px 10px; }
  .gallery-rail { flex: 1 1 auto; min-height: 0; }
  .gallery-slide { grid-template-columns: 1fr; padding: 4px 12px 16px; gap: 8px; }
  .gallery-sidebar { padding: 24px; }
  .gallery-admin { inset: 8px; padding: 8px; width: auto; max-height: calc(100vh - 16px); }
  .gallery-admin-dialog { border-radius: 18px; }
  .wiz-row { grid-template-columns: 1fr; }
  .wiz-curation { grid-template-columns: 1fr; }
  .wiz-curation-thumb { min-height: 120px; }
}

/* ── Star Rating ── */
@keyframes starShimmer {
  0%, 100% { text-shadow: 0 0 6px rgba(220,168,40,.35); }
  50%       { text-shadow: 0 0 10px rgba(255,210,60,.7), 0 0 18px rgba(220,160,20,.35); }
}
@keyframes starsBlockIn {
  0%   { opacity: 0; transform: scale(0.82) translateY(10px); filter: blur(3px); }
  100% { opacity: 1; transform: scale(1) translateY(0);      filter: blur(0); }
}
@keyframes ratingThanksIn {
  0%   { opacity: 0; transform: translateY(14px) scale(0.93); filter: blur(7px); }
  55%  { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes ratingThanksGlow {
  0%   { text-shadow: 0 0 12px rgba(220,168,40,.25); }
  40%  { text-shadow: 0 0 22px rgba(255,210,80,.7), 0 0 40px rgba(220,160,20,.35); }
  100% { text-shadow: 0 0 12px rgba(220,168,40,.25); }
}

.gallery-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(200,148,30,.22);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200,148,30,.10) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20,12,4,.6) 0%, rgba(8,4,2,.8) 100%);
  box-shadow: 0 0 0 1px rgba(255,220,80,.04), inset 0 1px 0 rgba(255,210,80,.06);
  flex-shrink: 0;
}

/* ── Stars ── */
.gallery-stars-wrap { display: flex; justify-content: center; }
.gallery-stars-display {
  display: flex;
  gap: 8px;
  animation: starsBlockIn .5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.star-d {
  font-size: 2rem;
  line-height: 1;
  user-select: none;
  cursor: pointer;
  transition: color .3s ease, text-shadow .3s ease, transform .12s ease;
}
.gallery-rating.has-voted .star-d,
.gallery-rating.is-loading .star-d { cursor: default; }
.star-d.star-empty  { color: rgba(200,148,30,.25); }
.star-d.star-half   { color: rgba(210,155,30,.52); text-shadow: none; }
.star-d.star-full {
  color: rgba(240,185,40,.95);
  text-shadow: 0 0 7px rgba(220,168,40,.6), 0 0 13px rgba(180,130,20,.25);
  animation: starShimmer 2.8s ease-in-out infinite;
}
.star-d.is-hover {
  color: rgba(255,225,90,1) !important;
  text-shadow:
    0 0 8px rgba(255,220,60,1),
    0 0 20px rgba(220,160,20,.85),
    0 0 38px rgba(180,120,10,.45) !important;
  transform: scale(1.25) translateY(-3px);
  animation: none !important;
}

/* Skeleton pulse while is-loading */
@keyframes starPulse {
  0%, 100% { color: rgba(200,148,30,.12); }
  50%       { color: rgba(200,148,30,.32); }
}
.gallery-rating.is-loading .star-d {
  color: rgba(200,148,30,.18);
  animation: starPulse 1.4s ease-in-out infinite;
}
.gallery-rating.is-loading .star-d:nth-child(1) { animation-delay: 0s; }
.gallery-rating.is-loading .star-d:nth-child(2) { animation-delay: .15s; }
.gallery-rating.is-loading .star-d:nth-child(3) { animation-delay: .30s; }
.gallery-rating.is-loading .star-d:nth-child(4) { animation-delay: .45s; }
.gallery-rating.is-loading .star-d:nth-child(5) { animation-delay: .60s; }

/* Stats text */
.gallery-rating-stats { min-height: 16px; }
.gallery-rating-count {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 1.5px;
  color: rgba(210,160,50,.6);
  text-transform: uppercase;
  text-align: center;
}

/* Post-vote state */
.gallery-rating-thanks {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.gallery-rating-thanks span {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.75rem;
  color: rgba(255,210,80,.65);
  animation: ratingThanksIn .85s cubic-bezier(0.22, 1, 0.36, 1) both,
             ratingThanksGlow 1.4s ease .7s both;
}
.gallery-rating.has-voted .gallery-rating-thanks { display: flex; }
.gallery-rating-undo {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(200,148,30,.25);
  cursor: pointer;
  color: rgba(200,148,30,.4);
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 10px 5px;
  transition: color .15s, border-color .15s;
  line-height: 1.4;
  animation: ratingThanksIn .65s cubic-bezier(0.22, 1, 0.36, 1) .38s both;
}
.gallery-rating-undo:hover { color: rgba(255,200,60,.7); border-color: rgba(255,200,60,.4); }
.gallery-rating-undo:disabled { opacity: 0.3; cursor: wait; }

/* Loading state */
.gallery-rating.is-loading .gallery-stars-display { opacity: 0.25; }
.gallery-rating.is-loading .gallery-stars-wrap { cursor: default; }
.gallery-rating.is-loading .gallery-rating-count { opacity: 0.4; }
