/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --green:      #4A7C59;
  --green-dark: #2F5240;
  --green-light:#E8F2EC;
  --gold:       #E8B84B;
  --gold-light: #FDF3D8;
  --tan:        #F5E6C8;
  --brown:      #8B6347;
  --brown-dark: #5C3F2A;
  --bg:         #FDFAF4;
  --ink:        #2C2416;
  --ink-soft:   #6B5B47;
  --white:      #FFFFFF;
 
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
 
  --shadow-sm: 0 1px 4px rgba(44,36,22,0.10);
  --shadow-md: 0 4px 16px rgba(44,36,22,0.12);
}
 
/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
html, body {
  height: 100%;
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
 
/* ── Screen system ──────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}
 
/* ── PARENT HOME SCREEN ─────────────────────────────────── */
#screen-parent {
  background: var(--bg);
  padding: 0;
}
 
.parent-header {
  background: var(--green);
  padding: 48px 24px 32px;
  text-align: center;
  position: relative;
}
 
.parent-header .app-eyebrow {
  font-family: 'Georgia', serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-light);
  opacity: 0.8;
  margin-bottom: 8px;
}
 
.parent-header h1 {
  font-family: 'Georgia', serif;
  font-size: 38px;
  font-weight: normal;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1;
}
 
.parent-header .tagline {
  margin-top: 10px;
  font-size: 13px;
  color: var(--tan);
  font-style: italic;
  letter-spacing: 0.04em;
}
 
/* Leaf accent — the signature element */
.leaf-divider {
  text-align: center;
  margin: 0;
  line-height: 0;
}
.leaf-divider svg {
  width: 100%;
  height: 32px;
}
 
.parent-body {
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
 
.section-label {
  font-family: 'Georgia', serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
 
/* Timer selector */
.timer-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--tan);
}
 
.timer-card .section-label { margin-bottom: 12px; }
 
.timer-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
 
.timer-btn {
  background: var(--tan);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  font-family: 'Georgia', serif;
  font-size: 15px;
  color: var(--brown-dark);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.timer-btn:hover { background: var(--gold-light); }
.timer-btn.selected {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--brown-dark);
  font-weight: bold;
}
 
.timer-btn span {
  display: block;
  font-size: 10px;
  color: var(--ink-soft);
  margin-top: 2px;
  font-style: italic;
}
 
/* PIN setup */
.pin-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--tan);
}
 
.pin-card .section-label { margin-bottom: 12px; }
 
.pin-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
 
.pin-input {
  flex: 1;
  border: 1.5px solid var(--tan);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 20px;
  letter-spacing: 0.3em;
  font-family: 'Georgia', serif;
  color: var(--ink);
  background: var(--bg);
  text-align: center;
  -webkit-text-security: disc;
}
.pin-input:focus {
  outline: none;
  border-color: var(--green);
}
 
.pin-hint {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 8px;
}
 
/* Hand off button */
.handoff-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  font-family: 'Georgia', serif;
  font-size: 18px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: background 0.15s ease, transform 0.1s ease;
  margin-top: 4px;
}
.handoff-btn:hover { background: var(--green-dark); }
.handoff-btn:active { transform: scale(0.98); }
.handoff-btn .handoff-sub {
  display: block;
  font-size: 12px;
  font-style: italic;
  color: var(--green-light);
  margin-top: 4px;
  letter-spacing: 0.03em;
}
 
/* Entry feed */
.entries-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--tan);
}
 
.entries-card .section-label { margin-bottom: 12px; }
 
.entry-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
}
 
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
 
.entry-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--tan);
}
 
.entry-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--tan);
  flex-shrink: 0;
}
 
.entry-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: var(--tan);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
 
.entry-meta {
  flex: 1;
  min-width: 0;
}
 
.entry-date {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
 
.entry-prompt {
  font-size: 13px;
  color: var(--ink);
  font-style: italic;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.entry-play-btn {
  background: var(--green-light);
  border: 1.5px solid var(--green);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.entry-play-btn:hover { background: var(--green); color: white; }
 
/* ── KID MODE SCREEN ────────────────────────────────────── */
#screen-kid {
  background: var(--green-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
 
.kid-timer-bar {
  background: rgba(0,0,0,0.2);
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
 
.kid-timer-display {
  font-family: 'Georgia', serif;
  font-size: 28px;
  color: var(--gold);
  letter-spacing: 0.05em;
  font-weight: normal;
}
 
.kid-timer-label {
  font-size: 11px;
  color: var(--tan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
 
.timer-progress {
  height: 4px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}
 
.timer-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 1s linear;
}
 
/* Prompt area */
.kid-prompt-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 28px;
  text-align: center;
}
 
.kid-prompt-emoji {
  font-size: 52px;
  margin-bottom: 16px;
  line-height: 1;
}
 
.kid-prompt-text {
  font-family: 'Georgia', serif;
  font-size: 22px;
  color: var(--white);
  line-height: 1.4;
  font-style: italic;
  max-width: 280px;
}
 
/* Capture controls */
.kid-controls {
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}
 
.capture-btn {
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  font-family: 'Georgia', serif;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.1s ease, opacity 0.15s ease;
  box-shadow: var(--shadow-md);
}
.capture-btn:active { transform: scale(0.97); }
 
.capture-btn-voice {
  background: var(--gold);
  color: var(--brown-dark);
}
 
.capture-btn-photo {
  background: var(--white);
  color: var(--green-dark);
}
 
.capture-btn .btn-icon { font-size: 22px; }
 
/* PIN overlay */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,36,22,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 32px;
}
.pin-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
 
.pin-overlay-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
 
.pin-overlay-title {
  font-family: 'Georgia', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}
 
.pin-overlay-sub {
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 24px;
}
 
.pin-dots {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}
 
.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--brown);
  background: transparent;
  transition: background 0.15s;
}
.pin-dot.filled { background: var(--green); border-color: var(--green); }
 
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
 
.key-btn {
  background: var(--tan);
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  font-family: 'Georgia', serif;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s;
}
.key-btn:active { background: var(--gold-light); }
.key-btn.key-del { font-size: 16px; color: var(--ink-soft); }
.key-btn.key-empty { background: transparent; cursor: default; }
 
.pin-error {
  color: #C0392B;
  font-size: 13px;
  font-style: italic;
  margin-top: 12px;
  min-height: 18px;
}
 
/* ── Utility ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
 
