/* King James 2 — Base styles */

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

html, body {
  font-family: 'Segoe UI', -apple-system, Arial, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(135deg, #2d1b69 0%, #1a0a3e 100%);
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  /* bottom safe area for iPhone home indicator */
  padding-bottom: env(safe-area-inset-bottom);
}

/* Buttons */
.kj-btn, .kj-btn-secondary, .kj-choice-btn, .kj-big-btn {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.12s, filter 0.12s;
}
.kj-btn:active, .kj-btn-secondary:active, .kj-choice-btn:active, .kj-big-btn:active {
  transform: scale(0.95);
  filter: brightness(0.92);
}

.kj-btn {
  font-size: 18px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, gold, #f39c12);
  color: #2d1b69;
  font-weight: bold;
}
.kj-btn-secondary {
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: bold;
  border: 2px solid rgba(255,255,255,0.25);
}
.kj-big-btn {
  font-size: 28px;
  font-weight: bold;
  padding: 16px 40px;
  border-radius: 20px;
  background: linear-gradient(135deg, gold, #f39c12);
  color: #2d1b69;
  box-shadow: 0 6px 0 #d4a017, 0 8px 18px rgba(0,0,0,0.4);
  margin: 8px 0;
}
.kj-choice-btn {
  font-size: 20px;
  font-weight: bold;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
  box-shadow: 0 4px 0 #1e8449;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
}
.kj-choice-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.kj-choice-icon { font-size: 26px; }

/* Typography */
h1, h2, h3 { text-shadow: 2px 2px 6px rgba(0,0,0,0.7); }
.kj-h2 { font-size: 24px; margin: 12px 0 8px; color: gold; text-align: center; }
.kj-h3 { font-size: 18px; margin: 10px 0 6px; color: #f1c40f; }
.kj-muted { color: rgba(255,255,255,0.6); font-size: 14px; }

/* Scene wrapper (inside #app) */
.kj-scene-wrap {
  padding: 12px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
}

/* Footer with back button */
.kj-footer-nav {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  justify-content: center;
}

/* Error / fallback */
.kj-error {
  padding: 30px 20px;
  text-align: center;
  color: #fff;
}
.kj-error code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; }
