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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Georgia, 'Times New Roman', serif;
  background: #fefefe;
  color: #333;
}

#stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scene {
  width: 100%;
  max-width: 800px;
  height: auto;
}

/* Floor line gets a subtle hand-drawn feel via stroke properties */
#floor {
  stroke-linejoin: round;
}

/* Thought bubble text wrapping */
#thought-text {
  dominant-baseline: middle;
}

/* Prompt button */
#prompt {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#prompt.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#prompt-btn {
  background: none;
  border: none;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  font-size: 14px;
  font-style: italic;
  color: #aaa;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

#prompt-btn:hover {
  color: #666;
}

#prompt-btn:focus {
  outline: 1px dashed #999;
  outline-offset: 4px;
}

/* Form overlay */
#form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(254, 254, 254, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
}

#form-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#submit-form {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 40px 24px;
}

#close-form {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

#close-form:hover {
  color: #666;
}

#close-form:focus {
  outline: 1px dashed #999;
  outline-offset: 2px;
}

.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  padding: 12px;
  font-family: Georgia, serif;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s ease;
}

.field input[type="text"]:focus,
.field input[type="email"]:focus {
  outline: none;
  border-color: #999;
}

#char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.checkbox-field label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.checkbox-field input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
}

.email-field {
  margin-top: -8px;
}

.email-field small {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

.turnstile-field {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.turnstile-field .cf-turnstile {
  transform: scale(0.85);
  transform-origin: center;
}

#submit-btn {
  display: block;
  width: 100%;
  padding: 12px;
  font-family: Georgia, serif;
  font-size: 16px;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#submit-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

#submit-btn:focus {
  outline: none;
  border-color: #999;
}

#submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#form-message {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 16px;
  min-height: 20px;
}

#form-message.error {
  color: #c44;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attribution {
  font-family: Georgia, serif;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.38);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.attribution:hover {
  opacity: 0.65;
}

#info-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

#info-btn:hover {
  color: rgba(0, 0, 0, 0.5);
}

/* Info modal */
#info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(254, 254, 254, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
}

#info-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#info-modal {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 40px 24px;
  text-align: center;
}

#close-info {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

#close-info:hover {
  color: #666;
}

.info-project {
  font-family: Georgia, serif;
  font-size: 12px;
  color: #999;
  margin-bottom: 24px;
  line-height: 1.6;
}

.info-project a {
  color: #666;
  text-decoration: none;
}

.info-project a:hover {
  text-decoration: underline;
}

.info-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.info-links a {
  font-family: Georgia, serif;
  font-size: 12px;
  color: #999;
  text-decoration: none;
}

.info-links a:hover {
  color: #666;
}

.info-faq {
  text-align: left;
}

.info-faq p {
  font-family: Georgia, serif;
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.5;
}

.info-faq strong {
  color: #999;
  font-weight: normal;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  #submit-form {
    padding: 32px 20px;
  }

  #prompt {
    bottom: 24px;
  }

  #prompt-btn {
    font-size: 13px;
  }

  .footer {
    bottom: 12px;
    right: 14px;
  }

  .attribution {
    font-size: 9px;
  }
}
