:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #111111;
  --muted: #5a5a5a;
  --border: rgba(0, 0, 0, .14);
  --shadow: 0 10px 28px rgba(0, 0, 0, .10);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit
}

/* Full-bleed layout */
.container {
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh
}

/* Keep a minimal header overlay (doesn't steal layout height) */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  z-index: 20;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
}

.brand h1 {
  margin: 0;
  font-family: "HelveticaNeue-CondensedBold", "Helvetica Neue Condensed Bold", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase !important;
  letter-spacing: .06em;
  font-size: 22px;
  line-height: 1;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center
}

.pill {
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  background: rgba(0, 0, 0, .03);
}

.button {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .03);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
}

.button:hover {
  background: rgba(0, 0, 0, .05)
}

/* Carousel */
.carousel {
  position: fixed;
  inset: 0;
  border: none;
  /* remove stroke */
  border-radius: 0;
  /* remove rounded corners */
  overflow: hidden;
  box-shadow: none;
  /* remove drop shadow */
  background: var(--panel);
}

.track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
  /* ✅ let JS control smoothness */
  -webkit-overflow-scrolling: touch;
  height: 100vh;
}

.track::-webkit-scrollbar {
  height: 10px
}

.track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .18);
  border-radius: 999px
}

.track::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .05)
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.slide img {
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  object-fit: contain;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}

.nav:hover {
  background: #fff
}

.nav:active {
  transform: translateY(-50%) scale(.98)
}

.nav.prev {
  left: 12px
}

.nav.next {
  right: 12px
}

.carousel-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: none;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.caption {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.counter {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.footer {
  display: none
}

/* Hide carousel arrows on phones (explicit) */
@media (max-width: 680px) {
  .nav {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0
  }

  .nav {
    width: 40px;
    height: 40px
  }
}

/* Password gate */
.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
}

.gate-card {
  width: min(520px, 92vw);
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.gate-card h2 {
  margin: 0 0 6px;
  font-size: 18px
}

.gate-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4
}

.gate-row {
  display: flex;
  gap: 10px
}

.gate-row input {
  flex: 1;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .03);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
}

.error {
  margin-top: 10px;
  color: #b00020;
  font-size: 12px;
  display: none
}

.error.show {
  display: block
}

.small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px
}

/* Mobile-only fixes */
@media (max-width: 768px) {

  #prevBtn,
  #nextBtn {
    display: none !important;
  }

  .header {
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }

  .brand h1 {
    font-size: 18px;
    line-height: 1.1;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 92vw;
  }

  .slide {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .slide img {
    width: 100vw;
    height: 100svh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
}

/* Hide spread labels and counters */
#caption,
#counter {
  display: none;
}