:root {
  --bg: #000000;
  --fg: #f5f0e8;
  --accent: #d9a441;
  --muted: #8a8a8a;
  --card-bg: #0b0b0b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
}

.screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: none;
}

.screen.active {
  display: flex;
}

/* ---------- Entry screen ---------- */

#entry {
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.enter-btn {
  appearance: none;
  border: 1px solid rgba(245, 240, 232, 0.35);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  padding: 1.1em 1.9em;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
  box-shadow: 0 0 0 0 rgba(217, 164, 65, 0);
}

.enter-btn:active {
  background: var(--accent);
  color: #1a1204;
  box-shadow: 0 0 30px 4px rgba(217, 164, 65, 0.35);
}

@media (hover: hover) {
  .enter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

/* ---------- Deck ---------- */

#deck {
  flex-direction: column;
  background: var(--bg);
}

.card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 8vw 12vh;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.card.current {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.card.leaving {
  opacity: 0;
  transform: translateY(-24px);
}

.card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(1rem, 5vh, 2.2rem);
  max-width: 34rem;
}

.photo-frame {
  width: min(66vw, 280px);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(217, 164, 65, 0.4);
  box-shadow: 0 0 40px rgba(217, 164, 65, 0.15);
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-text {
  font-size: clamp(1.15rem, 5vw, 1.6rem);
  line-height: 1.55;
  font-weight: 400;
  color: var(--fg);
}

.next-btn {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  padding: 0.9em 1.4em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.next-btn::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(-45deg);
  animation: pulse-right 1.6s ease-in-out infinite;
}

@keyframes pulse-right {
  0%, 100% { opacity: 0.25; transform: rotate(-45deg) translateX(0); }
  50% { opacity: 1; transform: rotate(-45deg) translateX(3px); }
}

/* ---------- Final card ---------- */

.card-final .card-inner {
  gap: clamp(0.8rem, 3vh, 1.4rem);
}

.card-final .photo-frame {
  width: min(72vw, 320px);
}

.card-title {
  font-size: clamp(1.8rem, 9vw, 2.6rem);
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 700;
}

.card-sub {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---------- Progress dots ---------- */

.progress {
  position: fixed;
  top: max(3vh, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5em;
  z-index: 5;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.2);
  transition: background 0.4s ease, transform 0.4s ease;
}

.dot.done {
  background: var(--accent);
  transform: scale(1.15);
}
