/* Guide4Believers — Explore the Bible · white studio, clarity first */
:root {
  --bg0: #f7f5f0;
  --ink: #2a241c;
  --muted: #6a6258;
  --gold: #9a7a3c;
  --gold-dim: rgba(154, 122, 60, 0.28);
  --ot: #8a6a48;
  --nt: #5a6e80;
  --glass: rgba(255, 252, 246, 0.78);
  --stroke: rgba(42, 36, 28, 0.12);
  --shadow: 0 14px 40px rgba(60, 48, 30, 0.1);
  --radius: 16px;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --ui: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #f7f5f0;
  color: var(--ink);
  font-family: var(--ui);
}

#canvas-wrap { position: fixed; inset: 0; z-index: 0; }
#canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(58% 52% at 50% 40%, transparent 55%, rgba(210,200,185,0.14) 100%);
}

.ui {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem 0.4rem;
}

.brand { pointer-events: auto; max-width: min(26rem, 55vw); }
.brand .eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.95;
}
.brand h1 {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #221c16;
}

.controls {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: min(28rem, 100%);
}

.secondary-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  max-width: 14rem;
}
.rainbow-note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: right;
  max-width: 14rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  box-shadow: 0 6px 20px rgba(60,48,30,0.08);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.15s, box-shadow 0.35s, color 0.35s;
}
.btn:hover {
  background: rgba(255,255,255,0.95);
  border-color: rgba(154, 122, 60, 0.45);
}
.btn:active { transform: scale(0.985); }
.btn.primary {
  background: linear-gradient(165deg, rgba(201,168,108,0.55), rgba(201,168,108,0.2));
  border-color: rgba(154, 122, 60, 0.65);
  color: #2a2216;
  font-size: 1.08rem;
  font-weight: 650;
  padding: 0.9rem 1.55rem;
  box-shadow: 0 10px 28px rgba(154,122,60,0.2);
}
.btn.primary:hover {
  background: linear-gradient(165deg, rgba(201,168,108,0.68), rgba(201,168,108,0.28));
}
.btn.quiet {
  background: rgba(255,252,246,0.7);
  border-color: rgba(42, 36, 28, 0.12);
  color: #8a8278;
  font-size: 0.78rem;
  padding: 0.48rem 0.85rem;
  font-weight: 500;
}
.btn.quiet:hover,
.btn.quiet.on {
  border-color: rgba(120, 100, 160, 0.35);
  background: rgba(245, 240, 250, 0.9);
  color: #4a3e5a;
}
.btn.reset {
  border-color: rgba(42,36,28,0.14);
  background: rgba(255,252,246,0.85);
  font-weight: 650;
  min-width: 5.75rem;
  font-size: 0.92rem;
  padding: 0.68rem 1.1rem;
  color: var(--ink);
}
.btn.reset:not(:disabled) {
  border-color: rgba(154,122,60,0.45);
}
.btn:disabled { opacity: 0.38; cursor: default; transform: none; box-shadow: none; }

/* Bubolka steps — light studio chrome */
.steps {
  pointer-events: none;
  margin: 0.2rem 1.25rem 0;
  max-width: min(58rem, 97vw);
}
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0.65rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  background: rgba(255, 252, 246, 0.82);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
  min-width: 0;
}
.step-num {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(42,36,28,0.05);
  color: var(--muted);
  border: 1px solid rgba(42,36,28,0.1);
}
.step-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.step-label {
  font-weight: 650;
  font-size: 0.88rem;
  color: inherit;
  line-height: 1.2;
}
.step-tip {
  font-size: 0.74rem;
  line-height: 1.35;
  color: #8a8278;
  font-weight: 400;
}
.step.on {
  color: #2a241c;
  background: rgba(201,168,108,0.16);
  border-color: var(--gold-dim);
}
.step.on .step-num {
  background: rgba(201,168,108,0.45);
  border-color: rgba(154,122,60,0.5);
  color: #2a2216;
}
.step.on .step-tip { color: #5a5248; }
.step.done { color: #5a5248; }
.step.done .step-num {
  background: rgba(201,168,108,0.18);
  border-color: rgba(154,122,60,0.28);
  color: var(--gold);
}
.step.optional .step-label::after {
  content: " (optional)";
  font-weight: 500;
  font-size: 0.72rem;
  color: #8a8278;
}
.step.optional.on .step-label::after { color: #6a6258; }

.hint {
  margin: auto 1.35rem 1.15rem;
  align-self: center;
  text-align: center;
  color: #3a342c;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
  background: rgba(255,252,246,0.88);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  backdrop-filter: blur(12px);
  max-width: min(92vw, 40rem);
  box-shadow: 0 8px 24px rgba(60,48,30,0.06);
}
.hint strong { color: var(--gold); font-weight: 650; }

.legend {
  position: absolute;
  left: 1.25rem;
  bottom: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.76rem;
  color: var(--muted);
  max-width: min(90vw, 26rem);
}
.legend span { display: inline-flex; align-items: center; gap: 0.38rem; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; display: inline-block; }
.dot.ot { background: var(--ot); box-shadow: 0 0 8px rgba(138,106,72,0.35); }
.dot.nt { background: var(--nt); box-shadow: 0 0 8px rgba(90,110,128,0.35); }
.dot.rainbow {
  background: linear-gradient(90deg, #c48a5a, #7a9a6a, #5a7aaa, #7a5aa0);
}

.welcome {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(247, 245, 240, 0.55);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.welcome[hidden] { display: none; }
.welcome.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.welcome-card {
  width: min(24rem, 100%);
  background: linear-gradient(165deg, #fffdf8, #f7f2e8);
  border: 1px solid rgba(154,122,60,0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.45rem 1.35rem;
  text-align: center;
}
.welcome-card p {
  margin: 0 0 1.15rem;
  font-size: 1.15rem;
  line-height: 1.45;
  color: #2a241c;
  font-family: var(--font);
}
.welcome-card .btn.primary { width: 100%; }

.card-overlay {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(40, 34, 28, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.card-overlay.open { opacity: 1; visibility: visible; }
.card {
  width: min(32rem, 100%);
  background: linear-gradient(165deg, #fffdf8, #f4efe6);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 1.85rem 1.75rem 1.65rem;
  position: relative;
  transform: translateY(6px);
  transition: transform 0.35s ease;
}
.card-overlay.open .card { transform: none; }
.card .tag {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
}
.card h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font);
  font-size: clamp(1.7rem, 3.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.2;
  color: #221c16;
}
.card p {
  margin: 0;
  color: #3a342c;
  line-height: 1.72;
  font-size: 1.14rem;
}
.card .close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.7);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}
.card .close:hover { color: var(--ink); border-color: var(--gold-dim); }

@media (max-width: 900px) {
  .steps-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top { flex-direction: column; align-items: stretch; padding: 0.85rem 0.85rem 0.3rem; }
  .brand { max-width: 100%; }
  .controls { justify-content: flex-start; max-width: 100%; }
  .btn.primary { width: 100%; text-align: center; font-size: 1.05rem; }
  .secondary-wrap { align-items: flex-start; max-width: 100%; width: 100%; }
  .rainbow-note { text-align: left; max-width: none; }
  .steps { margin: 0.1rem 0.85rem 0; }
  .steps-list { grid-template-columns: 1fr; gap: 0.3rem; }
  .legend { left: 0.85rem; bottom: 3.5rem; }
  .hint { margin-bottom: 0.85rem; font-size: 0.88rem; }
  .brand h1 { font-size: 1.28rem; }
  .card p { font-size: 1.06rem; }
  .welcome-card p { font-size: 1.08rem; }
}


/* —— MEGA cinematic + intuitive steps (camera-real family) —— */
.btn.primary {
  animation: cta-pulse 2.4s ease-in-out infinite;
  box-shadow: 0 10px 32px rgba(60, 48, 30, 0.22);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.btn.primary:disabled { animation: none; }
@keyframes cta-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 28px rgba(60,48,30,0.18); }
  50% { transform: scale(1.045); box-shadow: 0 16px 40px rgba(154,122,60,0.28); }
}
.steps {
  backdrop-filter: blur(16px) saturate(1.1);
  background: rgba(42, 36, 28, 0.78);
  color: #f7f5f0;
  border-radius: 18px;
  padding: 0.75rem 1rem;
  margin: 0.35rem 1.25rem 0;
  max-width: min(52rem, 94vw);
  pointer-events: auto;
}
.steps-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  opacity: 0.55;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  transition: opacity .45s ease, background .45s ease, transform .45s cubic-bezier(.2,.8,.2,1);
}
.step.on {
  opacity: 1;
  background: rgba(255, 252, 246, 0.14);
  transform: scale(1.03);
  box-shadow: inset 0 0 0 1px rgba(255,252,246,0.18);
}
.step.done { opacity: 0.78; }
.step-num {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #9a7a3c;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.step.on .step-num {
  background: #f7f5f0;
  color: #2a241c;
  box-shadow: 0 0 0 3px rgba(154,122,60,0.45);
}
.step-label { display: block; font-weight: 600; font-size: 0.82rem; }
.step-tip { display: block; font-size: 0.7rem; opacity: 0.8; line-height: 1.3; margin-top: 0.12rem; }
.hint {
  font-size: 1.05rem !important;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: rgba(42,36,28,0.82);
  color: #f7f5f0;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(60,48,30,0.2);
}
@media (max-width: 820px) {
  .steps-list { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .btn.primary { animation: none; }
}

.legend[hidden],
.rainbow-legend[hidden],
.card-overlay[hidden],
.welcome[hidden] { display: none !important; }
