/* Pet Milestone Photo Timeline - Styles */
:root {
  --bg: #faf8ff;
  --surface: #ffffff;
  --surface-alt: #f5f0ff;
  --border: #e2d9f3;
  --border-strong: #c4b5fd;
  --text: #1e1b2e;
  --text-secondary: #5b5278;
  --text-muted: #8b81a3;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: #ede9fe;
  --accent-glow: rgba(124, 58, 237, 0.12);
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: #059669;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.04);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.site-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--accent-light); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-danger { color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* Hero */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 480px;
}
.hero-visual { display: flex; justify-content: center; }
.timeline-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tp-item { display: flex; align-items: center; gap: 14px; }
.tp-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.tp-content { display: flex; flex-direction: column; }
.tp-content strong { font-size: 0.9rem; font-weight: 600; }
.tp-content span { font-size: 0.8rem; color: var(--text-muted); }

/* Sections */
section { padding: 60px 0; }
section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
  max-width: 600px;
}

/* Builder */
.builder-section { background: var(--surface); }
.builder-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 32px;
  align-items: start;
}
.builder-controls { display: flex; flex-direction: column; gap: 20px; }
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group small {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Presets */
.presets-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preset-btn {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.82rem;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  color: var(--text);
}
.preset-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* Actions */
.action-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.action-row:last-child { margin-bottom: 0; }
.save-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Timeline Preview */
.timeline-card { position: sticky; top: 80px; }
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.timeline-header h3 { font-size: 1.1rem; margin-bottom: 0; }
.milestone-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 4px 10px;
  border-radius: 20px;
}
.timeline-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.timeline-empty svg { margin: 0 auto 16px; }
.timeline-list { display: flex; flex-direction: column; gap: 0; }

/* Timeline Items */
.ms-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.ms-item:last-child { border-bottom: none; }
.ms-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 20px;
}
.ms-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--accent-light);
  flex-shrink: 0;
  z-index: 1;
}
.ms-connector {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin-top: 4px;
}
.ms-item:last-child .ms-connector { display: none; }
.ms-body { flex: 1; min-width: 0; }
.ms-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.ms-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.ms-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.ms-photo {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.ms-photo-placeholder {
  width: 100%;
  max-width: 280px;
  height: 160px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
  background: var(--surface-alt);
}
.ms-actions {
  display: flex;
  gap: 8px;
}
.ms-actions button {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.ms-actions button:hover { background: var(--surface-alt); }
.ms-actions .ms-delete:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }

/* Guide */
.guide-section { background: var(--surface); }
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.guide-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.guide-block h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.guide-block p { color: var(--text-secondary); font-size: 0.92rem; }

/* Examples */
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.example-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.example-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.example-list li { font-size: 0.88rem; color: var(--text-secondary); }
.example-list li strong { color: var(--text); }

/* FAQ */
.faq-section { background: var(--surface); }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
}
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-list summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list summary:hover { background: var(--surface-alt); }
.faq-list details p {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Mistakes */
.mistakes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.mistake-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 4px solid var(--accent);
}
.mistake-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.mistake-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 6px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: var(--text-secondary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* Print */
@media print {
  .site-header, .site-footer, .builder-controls, .actions-card, .ms-actions, .btn { display: none !important; }
  .builder-layout { display: block; }
  .timeline-card { position: static; box-shadow: none; border: none; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-visual { order: -1; }
  .timeline-preview-card { max-width: 300px; margin: 0 auto; }
  .builder-layout { grid-template-columns: 1fr; }
  .timeline-card { position: static; }
  .example-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .mistakes-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 1rem; }
  section { padding: 40px 0; }
  section h2 { font-size: 1.5rem; }
  .preset-grid { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; }
  .action-row .btn { width: 100%; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.82rem; }
  .footer-bottom { flex-direction: column; }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  pointer-events: none;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
