:root {
  --bg: #fdf8f0;
  --surface: #ffffff;
  --surface-2: #f6efe2;
  --border: #e4d6bf;
  --text: #2e241a;
  --muted: #6b5a44;
  --accent: #c0853e;
  --accent-dark: #8b5a2b;
  --accent-light: #f3dcc2;
  --success: #5a8a5a;
  --danger: #b84c3b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(46, 36, 26, 0.06), 0 8px 24px rgba(46, 36, 26, 0.08);
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { color: var(--accent-dark); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand-sub { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { font-size: 0.92rem; color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--accent-dark); text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 56px 0 40px;
}
.hero-copy h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 8px 0 16px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.eyebrow {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lead { color: var(--muted); font-size: 1.05rem; max-width: 560px; }
.hero-stats { display: flex; gap: 24px; margin-top: 24px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; color: var(--accent-dark); }
.hero-stats span { font-size: 0.82rem; color: var(--muted); }
.hero-art { display: flex; justify-content: center; color: var(--accent-dark); }

.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: 1.5rem; margin: 0 0 6px; }
.section-head p { color: var(--muted); margin: 0; max-width: 620px; }

.planner-section { padding: 32px 0; }
.planner-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}
.setup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
fieldset { border: none; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  background: var(--surface-2);
  transition: background 0.15s, border-color 0.15s;
}
.chip input { display: none; }
.chip:has(input:checked) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.presets-label { font-size: 0.82rem; color: var(--muted); }
.preset-btn {
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--accent-dark);
}
.preset-btn:hover { border-color: var(--accent); background: var(--accent-light); }

.btn-primary {
  background: var(--accent-dark);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.btn-primary:hover { background: #6d4520; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-ghost:hover { background: var(--surface-2); }

.plan-output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  min-height: 320px;
}
.plan-empty { color: var(--muted); }
.plan-empty h3 { color: var(--text); margin-top: 0; }
.plan-meta {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  color: var(--muted);
}
.plan-meta strong { color: var(--text); }
.plan-scroll { overflow-x: auto; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.plan-table th, .plan-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.plan-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.plan-table td:nth-child(1) { width: 48px; font-weight: 600; }
.plan-table td:nth-child(3) { white-space: nowrap; }
.plan-table tr.current-day { background: var(--accent-light); }
.plan-table tr.done td { color: var(--muted); text-decoration: line-through; }
.plan-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.log-section { padding: 32px 0; border-top: 1px solid var(--border); }
.log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.log-entry, .log-history {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.log-entry label { display: block; font-size: 0.85rem; font-weight: 600; margin: 10px 0 6px; }
.log-entry select, .log-entry textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--surface-2);
  color: var(--text);
}
.log-entry textarea { resize: vertical; }
.mood-row { display: flex; gap: 8px; margin-top: 4px; }
.mood-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  background: var(--surface-2);
}
.mood-chip input { display: none; }
.mood-chip:has(input:checked) {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}
.log-history h3 { margin-top: 0; }
.log-list { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.log-list li {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.log-list li:last-child { border-bottom: none; }
.log-list .log-mood {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 8px;
}
.log-mood.great { background: #d9ecd9; color: #2f5a2f; }
.log-mood.ok { background: #f3e4c6; color: #7a5a1e; }
.log-mood.hard { background: #f3d4cc; color: #8a3a2a; }
.log-empty { color: var(--muted); font-size: 0.9rem; }

.scenario-section { padding: 32px 0; border-top: 1px solid var(--border); }
.scenario-list { margin: 0; padding-left: 20px; }
.scenario-list li { margin-bottom: 12px; color: var(--text); }
.scenario-list strong { color: var(--accent-dark); }

.mistakes-section { padding: 32px 0; border-top: 1px solid var(--border); }
.mistake-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mistake-list li {
  background: var(--surface);
  border-left: 4px solid var(--danger);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
}
.mistake-list strong { color: var(--danger); }

.faq-section { padding: 32px 0; border-top: 1px solid var(--border); }
.faq-list { margin: 0; display: grid; gap: 16px; }
.faq-list dt {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.faq-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.print-card {
  background: #fff;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
  max-width: 520px;
}
.print-card h2 { margin-top: 0; }
.card-row { display: flex; gap: 8px; margin-bottom: 8px; font-size: 0.95rem; }
.card-label { font-weight: 600; color: var(--accent-dark); min-width: 110px; }
.card-notes { margin-top: 12px; }
.card-notes .card-label { display: block; margin-bottom: 8px; }
.card-lines { border-bottom: 1px solid var(--border); height: 80px; }
.card-footer { margin-top: 16px; font-size: 0.8rem; color: var(--muted); text-align: right; }

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer p { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; max-width: 420px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: var(--muted); }
.footer-links a:hover { color: var(--accent-dark); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 32px 0; }
  .hero-art { order: -1; }
  .planner-grid { grid-template-columns: 1fr; }
  .log-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .planner-section, .log-section, .scenario-section, .mistakes-section, .faq-section, .hero { display: none; }
  .print-card { display: block !important; border: 1px solid #000; box-shadow: none; }
}



/* 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;
}
