* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(68, 255, 144, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(0, 150, 255, 0.14), transparent 35%),
    #07110b;
  color: #e9ffe9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 24px;
}

.story-card {
  width: 100%;
  max-width: 850px;
  max-height: calc(100vh - 100px);
  height: 90vh;
  background: rgba(3, 32, 13, 0.88);
  border: 1px solid rgba(150, 255, 180, 0.25);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  padding: 32px;
  position: relative;
  overflow-y: auto;
  scroll-behavior: smooth;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 255, 182, 0.55) rgba(255, 255, 255, 0.06);
}

.story-card::before {
  content: "";
  position: sticky;
  top: 0;
  display: block;
  height: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    transparent 35%,
    rgba(255, 255, 255, 0.03)
  );
  pointer-events: none;
}

.story-card::-webkit-scrollbar {
  width: 10px;
}

.story-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.story-card::-webkit-scrollbar-thumb {
  background: rgba(154, 255, 182, 0.45);
  border-radius: 999px;
  border: 2px solid rgba(3, 32, 13, 0.88);
}

.story-card::-webkit-scrollbar-thumb:hover {
  background: rgba(154, 255, 182, 0.7);
}

.label {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(96, 255, 150, 0.12);
  color: #aaffc7;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.12;
}

#story {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
  white-space: pre-wrap;
  position: relative;
  z-index: 1;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.25em;
  margin-left: 3px;
  background: #baffc9;
  vertical-align: text-bottom;
  animation: blink 0.8s infinite;
}

.legal-links {
  font-size: 0.85rem;
  color: rgba(233, 255, 233, 0.45);
}

.legal-links a {
  color: rgba(233, 255, 233, 0.65);
  text-decoration: none;
}

.legal-links a:hover {
  color: #baffc9;
  text-decoration: underline;
}

@keyframes blink {
  0%, 45% {
    opacity: 1;
  }

  46%, 100% {
    opacity: 0;
  }
}

.buttons {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  background: #9affb6;
  color: #06200d;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-2px);
  background: #c4ffd4;
}

button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #e9ffe9;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

button.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.footer-note {
  margin-top: 24px;
  color: rgba(233, 255, 233, 0.65);
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  body {
    padding: 12px;
  }

  .story-card {
    height: 94vh;
    padding: 24px;
    border-radius: 18px;
  }
}

.legal-card {
  height: auto;
  max-height: calc(100vh - 100px);
}

.legal-content {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(233, 255, 233, 0.88);
  position: relative;
  z-index: 1;
}

.legal-content h2 {
  margin-top: 32px;
  margin-bottom: 10px;
  font-size: 1.35rem;
  color: #baffc9;
}

.legal-content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 1.1rem;
  color: #d9ffe2;
}

.legal-content p {
  margin: 0 0 14px;
}

.legal-content a {
  color: #9affb6;
  text-decoration: none;
}

.legal-content a:hover {
  color: #c4ffd4;
  text-decoration: underline;
}

.legal-content .muted {
  color: rgba(233, 255, 233, 0.6);
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  color: rgba(233, 255, 233, 0.7);
  text-decoration: none;
}

.back-link:hover {
  color: #baffc9;
  text-decoration: underline;
}