:root {
  --desk-color: #e6e2dd; /* Darker background to make the page pop */
  --page-color: #fcfcf9; /* Classic paper off-white */
  --text-dark: #3a3632;
  --text-light: #7a7571;
  --accent-color: #849b87; /* Soft sage green */
  --margin-line: rgba(230, 160, 160, 0.5); /* Classic notebook red line */
  --ruled-line: #e0dcd3;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--desk-color);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

/* The physical "Page" */
#app-container {
  background-color: var(--page-color);
  width: 100%;
  max-width: 600px;
  min-height: 75vh;
  padding: 3rem 2rem 3rem 4rem; /* Extra left padding for the margin */
  position: relative;
  
  /* Book/Page depth and curves */
  border-radius: 4px 16px 16px 4px; 
  box-shadow: 
    -2px 0 5px rgba(0,0,0,0.05), /* Subtle left spine shadow */
    5px 10px 20px rgba(0,0,0,0.08), /* Main drop shadow */
    inset 0 0 40px rgba(0,0,0,0.02); /* Slight inner texture */
}

/* The vertical red margin line */
#app-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2.5rem;
  width: 2px;
  background-color: var(--margin-line);
}

h2 {
  font-family: 'Merriweather', serif;
  font-weight: 400;
  color: #2c2926;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
  line-height: 1.3;
}

p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* The Ruled Text Area */
textarea {
  width: 100%;
  min-height: 192px; /* Multiple of 32px to fit lines cleanly */
  background-color: transparent;
  border: none;
  
  /* Creates the ruled notebook lines */
  background-image: repeating-linear-gradient(
    transparent, 
    transparent 31px, 
    var(--ruled-line) 31px, 
    var(--ruled-line) 32px
  );
  
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  color: var(--text-dark);
  resize: none;
  outline: none;
  margin-bottom: 2rem;
  
  /* Critical: Line height must match the repeating gradient (32px) */
  line-height: 32px; 
}

/* A subtle highlight when typing */
textarea:focus {
  background-image: repeating-linear-gradient(
    transparent, 
    transparent 31px, 
    var(--accent-color) 31px, 
    var(--accent-color) 32px
  );
}

button.next-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-family: 'Inter', sans-serif;
  display: block;
  margin-top: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

button.next-btn:hover {
  background-color: #728775;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* Smooth step transitions */
.step {
  display: none;
  opacity: 0;
  animation: fadeIn 0.8s forwards;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#summary-box {
  background-color: rgba(224, 220, 211, 0.4);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-family: 'Merriweather', serif;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.8;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}
/* iOS Install Banner Styles */
#ios-install-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  background-color: #fdfbf7; /* Warm off-white */
  border: 1px solid var(--margin-line);
  border-radius: 12px;
  padding: 1rem 2.5rem 1rem 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#ios-install-banner.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

#ios-install-banner p {
  margin: 0;
  line-height: 1.4;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
}

.close-banner {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 5px;
}

.close-banner:hover {
  color: var(--text-dark);
}