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

:root {
  --bg: #FAF9F6;
  --text: #2D2D2D;
  --muted: #888888;
  --subtle: #AAAAAA;
  --white: #FFFFFF;
}

html, body {
  height: 100%;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Selection styling */
::selection {
  background-color: var(--text);
  color: var(--bg);
}

#app {
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

/* Onboarding screens */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.screen h1 {
  font-size: 2.5rem;
  font-weight: normal;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.screen p {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 280px;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.screen p.tagline {
  font-style: italic;
  color: var(--text);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.screen button {
  margin-top: 2rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--text);
  font-family: inherit;
  font-size: 1.125rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.25rem 0;
  letter-spacing: 0.025em;
  transition: opacity 0.2s ease;
}

.screen button:hover {
  opacity: 0.7;
}

/* Time picker */
.time-picker {
  font-family: inherit;
  font-size: 1.875rem;
  border: none;
  border-bottom: 1px solid var(--text);
  background: transparent;
  text-align: center;
  padding: 0.5rem;
  margin-top: 1rem;
  color: var(--text);
}

.time-picker:focus {
  outline: none;
}

/* Main screen */
.main {
  min-height: 100vh;
  position: relative;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-icon {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0.5rem;
  transition: color 0.2s ease;
  z-index: 20;
}

.settings-icon:hover {
  color: var(--text);
}

/* Background messages */
.background-messages {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.background-message {
  position: absolute;
  color: var(--muted);
  max-width: 200px;
  font-size: 0.875rem;
  line-height: 1.6;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .background-message {
    font-size: 1rem;
  }
}

/* Center content - white paper with feathered edges */
.center-content {
  position: relative;
  width: 100%;
  max-width: 36rem;
  padding: 3rem 4rem;
  text-align: center;
  background: var(--white);
  z-index: 10;
  box-shadow:
    0 0 60px 30px rgba(250, 249, 246, 0.95),
    0 0 120px 60px rgba(250, 249, 246, 0.7);
}

@media (max-width: 640px) {
  .center-content {
    padding: 2rem;
    max-width: 100%;
    margin: 0 1rem;
  }
}

/* Entry input - textarea style */
.entry-input {
  width: 100%;
  font-family: inherit;
  font-size: 1.25rem;
  border: none;
  background: transparent;
  padding: 0;
  text-align: center;
  resize: none;
  min-height: 80px;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .entry-input {
    font-size: 1.5rem;
  }
}

.entry-input:focus {
  outline: none;
}

.entry-input::placeholder {
  color: var(--subtle);
}

/* Divider line */
.input-divider {
  width: 100%;
  height: 1px;
  background: rgba(45, 45, 45, 0.1);
  margin: 1.5rem 0 2rem;
}

.actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.actions button {
  background: none;
  border: none;
  border-bottom: 1px solid var(--text);
  font-family: inherit;
  font-size: 1.125rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.125rem 0;
  letter-spacing: 0.025em;
  transition: opacity 0.2s ease;
}

.actions button:hover {
  opacity: 0.7;
}

.actions button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Today entry display */
.today-entry {
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.7;
  animation: fadeIn 1s ease;
}

@media (min-width: 768px) {
  .today-entry {
    font-size: 1.5rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Settings screen */
.settings {
  min-height: 100vh;
  padding: 2rem;
}

.back-button {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--subtle);
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--text);
}

.settings-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  gap: 3rem;
}

.settings-content h2 {
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.settings-content label {
  font-size: 1.5rem;
  color: var(--text);
  font-weight: normal;
  margin-bottom: 1rem;
}

.settings-hint {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 280px;
  text-align: center;
  line-height: 1.6;
  margin-top: 1rem;
}

/* Settings sections */
.settings-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.5rem;
}

.settings-section:last-child {
  margin-bottom: 0;
}

/* Push notification settings */
.push-status {
  font-size: 0.95rem;
  margin: 0;
}

.push-status-enabled {
  color: #5a8a5a;
}

.push-status-disabled {
  color: var(--muted);
}

.push-status-unavailable {
  color: var(--subtle);
  font-style: italic;
}

.push-hint {
  font-size: 0.85rem;
  color: var(--subtle);
  margin-top: 0.5rem;
  text-align: center;
}

.push-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.push-toggle-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.push-toggle-btn:hover {
  color: var(--text);
}

/* Character counter */
.char-counter {
  font-size: 0.75rem;
  color: var(--subtle);
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.char-counter.visible {
  opacity: 1;
}

.char-counter.warning {
  color: #c0a080;
}
