*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #fff;
  color: #000;
  cursor: url('images/horse_cursor.png?v=3') 4 1, auto;
}

/* ── Header ── */
header {
  padding: 20px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  z-index: 100;
  background: #fff;
}

.header-name {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #000;
  justify-self: start;
}

.header-ig {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #000;
  text-decoration: none;
  justify-self: end;
  padding-right: 4px;
}

.header-ig:hover {
  text-decoration: underline;
}

.logo {
  height: 80px;
  width: auto;
  display: block;
}

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.item {
  overflow: visible;
}

.item img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Preview mode: fullscreen piece viewer ── */
body.preview-mode .grid {
  display: none !important;
}

.caption {
  display: none;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: #999;
  margin-top: 10px;
}

/* ── Fullscreen viewer ── */
#viewer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  z-index: 50;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide.exit-up {
  opacity: 0;
}

.slide img {
  max-width: 82vw;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.slide .slide-caption {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: #999;
  margin-top: 12px;
  letter-spacing: 0.02em;
}

/* Nav dots */
#viewer-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-dot.active {
  background: #000;
}

/* ── Edit toggle button (hidden by default, shown via ?edit URL param) ── */
.edit-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 11px;
  font-family: monospace;
  letter-spacing: 0.15em;
  cursor: pointer;
  z-index: 9001;
  display: none;
}

/* ── Mobile ── */
@media (max-width: 680px) {
  header {
    padding: 20px;
  }

  /* Override editor absolute positioning — reset to clean single column */
  .grid {
    display: block !important;
    position: static !important;
    height: auto !important;
    width: 100% !important;
  }

  .item {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    left: auto !important;
    top: auto !important;
    display: block;
    overflow: hidden;
  }

  .item img {
    width: 100% !important;
    height: auto !important;
    object-fit: unset !important;
    display: block;
  }
}
