
:root {
  /* --- palet --- */
  --bg-deep:      #0a0c1b;
  --bg-deep-2:    #10142b;
  --ink:          #f5f3ef;
  --ink-dim:      #b9b8c9;
  --gold:         #f4c95d;
  --rose:         #e8607a;
  --teal:         #4fd1c5;
  --violet:       #9b8cf2;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden; /* seluruh app itu satu layar penuh (canvas) */
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

.screen--cover {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.screen--cover.is-leaving {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.stars-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  max-width: 520px;
}

.cover-eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.cover-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 9vw, 3.2rem);
  line-height: 1.15;
  margin: 0 0 16px;
}

.cover-subtitle {
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  color: var(--ink-dim);
  margin: 0 0 32px;
  line-height: 1.6;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: #221a05;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(244, 201, 93, 0.5);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  animation: pulse-glow 2.6s ease-in-out infinite;
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 201, 93, 0.35); }
  50%      { box-shadow: 0 0 0 14px rgba(244, 201, 93, 0); }
}


.screen--galaxy { background: var(--bg-deep); }

.screen--galaxy.is-entering {
  animation: galaxy-fade-in 0.7s ease both;
}

@keyframes galaxy-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#galaxy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

.galaxy-header {
  position: absolute;
  top: calc(16px + var(--safe-top));
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.galaxy-header__hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 999px;
  pointer-events: none;
}

.icon-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 2;
  text-align: center;
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  pointer-events: none;
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(5, 6, 15, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 0.25s ease both;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 82dvh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-deep-2), var(--bg-deep));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 28px 24px calc(28px + var(--safe-bottom));
  animation: slide-up 0.32s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-visual {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 40px 6px var(--sheet-glow, rgba(244, 201, 93, 0.35));
}

.sheet-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 46vh;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 0 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 40px 4px var(--sheet-glow, rgba(244, 201, 93, 0.25));
}

.sheet-photo__track {
  display: flex;
  height: 100%;
  touch-action: pan-y;
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
}

.sheet-photo__track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 12, 27, 0.45);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.photo-nav--prev { left: 10px; }
.photo-nav--next { right: 10px; }

.photo-nav[hidden] { display: none; }

.photo-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.photo-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.2s ease, transform 0.2s ease;
}

.photo-dots span.is-active {
  background: #fff;
  transform: scale(1.25);
}

.sheet-date {
  margin: 0 0 6px;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.sheet-title {
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 5vw, 1.6rem);
}

.sheet-story {
  margin: 0 auto;
  max-width: 46ch;
  text-align: center;
  line-height: 1.7;
  color: var(--ink-dim);
  font-size: 0.98rem;
}

.sheet-nav {
  margin-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.btn-ghost {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 0.85rem;
}

.btn-ghost:disabled {
  opacity: 0.35;
  pointer-events: none;
}


[hidden] { display: none !important; }

.finale-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 15, 0.65);
  backdrop-filter: blur(4px);
  animation: fade-in 0.5s ease both;
}

.finale-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  background: linear-gradient(180deg, rgba(244, 201, 93, 0.08), var(--bg-deep-2) 55%);
  border: 1px solid rgba(244, 201, 93, 0.25);
  border-radius: 24px;
  padding: 40px 28px;
  box-shadow: 0 0 60px 10px rgba(244, 201, 93, 0.12);
  animation: finale-rise 0.6s cubic-bezier(.2,.8,.2,1) both 0.15s;
}

@keyframes finale-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.finale-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.finale-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 6vw, 1.8rem);
  margin: 0 0 16px;
}

.finale-message {
  color: var(--ink-dim);
  line-height: 1.7;
  font-size: 0.98rem;
  margin: 0 0 28px;
}

@media (prefers-reduced-motion: reduce) {
  .finale-overlay, .finale-card { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary { animation: none; }
  .sheet, .sheet-overlay { animation: none; }
  .screen--cover { transition: none; }
  .screen--galaxy.is-entering { animation: none; }
}

@media (min-width: 700px) {
  .galaxy-header { top: 24px; left: 24px; right: 24px; }
  .sheet { padding: 34px 40px calc(34px + var(--safe-bottom)); border-radius: 28px 28px 0 0; }
  .sheet-visual { width: 96px; height: 96px; font-size: 2.5rem; }
  .sheet-photo { max-height: 52vh; }
}
