*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: #e5e7eb;
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

#app {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 12px env(safe-area-inset-right) calc(12px + env(safe-area-inset-bottom))
    env(safe-area-inset-left);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-header {
  text-align: center;
}

.app-title {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scene-image-container {
  position: relative;
  width: 100%;
  background: radial-gradient(circle at top, #0f172a, #020617);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  min-height: 180px;
}

.scene-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene-content {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  max-height: 40vh;
  overflow-y: auto;
}

.scene-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.scene-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.choice-button {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-transform: none;
  cursor: pointer;
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #020617;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8),
    0 15px 30px rgba(15, 23, 42, 0.9);
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    filter 0.1s ease;
}

.choice-button.secondary {
  background: linear-gradient(135deg, #4b5563, #0f172a);
  color: #e5e7eb;
}

.choice-button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.9);
  filter: brightness(0.96);
}

.choice-button:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

@media (min-width: 720px) and (orientation: landscape) {
  .app-main {
    flex-direction: row;
  }

  .scene-image-container {
    flex: 3;
    min-height: 0;
  }

  .scene-content {
    flex: 4;
    max-height: none;
  }

  .choices {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    left: max(16px, env(safe-area-inset-left));
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .choice-button {
    max-width: 320px;
  }
}

