/* Your Own Lantern — Personal memory bridge · Three Minds Publishing
   Designed for Dr. Steven L. Johnson and his wife.
   Large text, gentle colors, slow pace, dignity first.
   AI is the bridge. Humanity is the mission.
*/

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: #faf7f2;
  color: #2a2622;
  font-size: 22px;       /* big base text */
  line-height: 1.55;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 2px solid #e8ddc9;
  padding: 1.4rem 1.2rem 1.2rem;
  text-align: center;
}
.header h1 {
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
  color: #5d4a32;
  letter-spacing: 0.5px;
}
.header .tagline {
  font-style: italic;
  color: #8a7559;
  margin: 0;
  font-size: 1rem;
}
.header .date {
  margin-top: 0.6rem;
  font-size: 1.15rem;
  color: #2a2622;
}

/* Main container */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.2rem;
}

/* The four big buttons */
.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 2rem;
}
@media (max-width: 540px) {
  .buttons { grid-template-columns: 1fr; }
}

.big-button {
  background: #fff;
  border: 2px solid #d9c9a8;
  border-radius: 14px;
  padding: 1.6rem 1rem;
  font-size: 1.35rem;
  font-family: inherit;
  color: #2a2622;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.big-button:hover, .big-button:active {
  background: #f4ead4;
  border-color: #b89d6c;
}
.big-button:active { transform: scale(0.98); }
.big-button .icon { font-size: 2.4rem; line-height: 1; }
.big-button .label { font-weight: 600; }

/* Sections (panels that show after a button is tapped) */
.panel {
  background: #fff;
  border: 1px solid #e8ddc9;
  border-radius: 12px;
  padding: 1.4rem;
  margin-bottom: 1.4rem;
  display: none;
}
.panel.active { display: block; }
.panel h2 {
  margin: 0 0 0.8rem;
  font-size: 1.5rem;
  color: #5d4a32;
}

/* Mic button */
.mic-button {
  display: block;
  width: 100%;
  padding: 1.4rem;
  font-size: 1.5rem;
  font-family: inherit;
  background: #b89d6c;
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background 0.15s;
}
.mic-button:hover, .mic-button:active { background: #9d8456; }
.mic-button.recording {
  background: #c25b5b;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 91, 91, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(194, 91, 91, 0); }
}

/* Text input (used as fallback or for editing) */
.text-input {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  font-family: inherit;
  border: 2px solid #d9c9a8;
  border-radius: 10px;
  background: #fff;
  color: #2a2622;
  resize: vertical;
  min-height: 110px;
}
.text-input:focus {
  outline: none;
  border-color: #b89d6c;
}

/* Save button */
.save-button {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  font-size: 1.15rem;
  font-family: inherit;
  background: #5d4a32;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 0.8rem;
}
.save-button:hover, .save-button:active { background: #463720; }

/* Status / confirmation */
.status {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin: 0.8rem 0;
  font-size: 1.05rem;
}
.status.success { background: #e8f1e0; color: #3e5a2c; border: 1px solid #b9d4a0; }
.status.info    { background: #f0eadb; color: #5d4a32; border: 1px solid #d9c9a8; }

/* Memory list */
.memory-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.memory-item {
  background: #faf7f2;
  border: 1px solid #e8ddc9;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}
.memory-item .when {
  display: block;
  font-size: 0.9rem;
  color: #8a7559;
  margin-bottom: 0.3rem;
}
.memory-item .what { color: #2a2622; }

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: #8a7559;
  font-size: 0.95rem;
  font-style: italic;
}

/* The "Back to home" link */
.back-link {
  display: inline-block;
  font-size: 1.05rem;
  color: #5d4a32;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}
.back-link::before { content: "← "; }

/* Ask Claude button */
.ask-claude {
  display: block;
  width: 100%;
  padding: 1.2rem;
  font-size: 1.25rem;
  font-family: inherit;
  background: #fff;
  color: #5d4a32;
  border: 2px solid #b89d6c;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-top: 1rem;
}
.ask-claude:hover { background: #f4ead4; }

/* Small helper text */
.helper {
  font-size: 1rem;
  color: #6b5d47;
  font-style: italic;
  margin: 0.5rem 0 1rem;
}

/* Larger touch targets on iPad */
button, .big-button, .ask-claude { min-height: 56px; }

/* Quiet mode for night */
@media (prefers-color-scheme: dark) {
  /* keep light for clarity — dementia research suggests light backgrounds aid reading */
}
