:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #3b2922;
  background: #f3e8dc;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3e8dc; }
.hero { padding: 28px max(20px, calc((100% - 1080px) / 2)); background: linear-gradient(130deg, #7f3f31, #ad5f46 62%, #d49778); color: #fffaf5; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.hero h1 { margin: 3px 0 5px; font-size: clamp(2rem, 5vw, 3.4rem); }
.hero p { margin: 0; opacity: .92; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 800; margin: 0; color: #a85039; }
.hero .eyebrow { color: #f5d8c7; }
.signal { background: #fffaf51f; border: 1px solid #fffaf55c; border-radius: 999px; padding: 10px 14px; font-size: .82rem; white-space: nowrap; }
.tabs { position: sticky; top: 0; z-index: 5; background: #fdf7f1; border-bottom: 1px solid #dfc9bb; display: flex; justify-content: center; gap: 4px; padding: 8px; }
.tab { border: 0; background: transparent; padding: 12px 18px; border-radius: 12px; font-weight: 750; color: #806d63; cursor: pointer; }
.tab.active { color: #98442f; background: #efdbcf; }
main { max-width: 1080px; margin: 0 auto; padding: 22px; }
.view { display: none; }
.view.active { display: grid; gap: 18px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metrics article, .card { background: #fffaf5; border: 1px solid #e4cfc1; border-radius: 20px; box-shadow: 0 8px 30px #6e38220d; }
.metrics article { padding: 18px; display: grid; gap: 6px; }
.metrics span, .metrics small { color: #806f65; }
.metrics strong { font-size: 1.7rem; }
.metrics small { font-size: .78rem; }
.card { padding: 24px; }
.card h2 { margin: 6px 0 14px; }
.priority { background: linear-gradient(140deg, #fffaf5 50%, #f0d7c8); }
.script { padding: 16px; border-radius: 14px; background: #f6e9df; line-height: 1.65; margin: 14px 0; }
.primary { background: #a64f38; color: #fffaf5; border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 750; cursor: pointer; }
.primary:hover { background: #8f3f2c; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.day { padding: 13px; border-radius: 14px; background: #f8eee6; border: 1px solid #e7d2c4; min-height: 130px; }
.day b { display: block; color: #a64f38; margin-bottom: 8px; }
.day span { font-size: .87rem; line-height: 1.35; }
.insight li { margin: 9px 0; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid label { display: grid; gap: 7px; font-weight: 700; }
.form-grid input, .form-grid select { width: 100%; padding: 12px; border: 1px solid #d9bfae; border-radius: 10px; background: #fffaf5; color: #3b2922; font: inherit; }
.form-grid input:focus, .form-grid select:focus { outline: 2px solid #c9785d; outline-offset: 1px; }
.form-grid .primary { align-self: end; }
.generated h3 { color: #a64f38; }
.generated pre { white-space: pre-wrap; font: inherit; line-height: 1.65; background: #f6e9df; padding: 16px; border-radius: 14px; }
.generated-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 22px; }
.generated-actions button:not(.primary), .film-actions button:not(.primary) { border: 1px solid #d2ad99; background: #fffaf5; color: #573b30; border-radius: 12px; padding: 12px 16px; font-weight: 750; cursor: pointer; }
.secondary-link { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #a64f38; color: #8f3f2c; background: #fffaf5; border-radius: 12px; padding: 11px 16px; font-weight: 750; text-decoration: none; }
.generated details { margin-top: 18px; }
.generated summary { color: #8f3f2c; font-weight: 750; cursor: pointer; }
.paste-idea { display: grid; gap: 8px; font-weight: 700; margin-bottom: 12px; }
.paste-idea textarea { width: 100%; resize: vertical; border: 1px solid #d9bfae; border-radius: 12px; background: #fffaf5; color: #3b2922; padding: 14px; font: inherit; line-height: 1.5; }
.paste-idea textarea:focus { outline: 2px solid #c9785d; outline-offset: 1px; }
.saved-ideas { display: grid; gap: 10px; margin-top: 18px; }
.saved-idea { border: 1px solid #e7d2c4; border-radius: 14px; background: #f8eee6; padding: 14px; }
.saved-idea summary { cursor: pointer; font-weight: 800; }
.saved-idea pre { white-space: pre-wrap; font: inherit; line-height: 1.55; max-height: 420px; overflow: auto; }
.growth-analysis { display: grid; gap: 14px; }
.analysis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.analysis-grid > div { display: grid; gap: 6px; padding: 17px; border-radius: 16px; background: #f6e9df; }
.analysis-grid span, .analysis-grid small { color: #806f65; }
.analysis-grid strong { color: #8f3f2c; font-size: 1.25rem; }
.analysis-advice { padding: 18px; border-left: 5px solid #a64f38; border-radius: 12px; background: #f8eee6; }
.analysis-advice p { font-size: 1.12rem; margin: 7px 0; }
.content-calendar { display: grid; gap: 9px; margin-top: 18px; max-height: 620px; overflow: auto; }
.calendar-day { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding: 13px; background: #f8eee6; border: 1px solid #e7d2c4; border-radius: 14px; }
.calendar-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #a64f38; color: #fffaf5; font-weight: 800; }
.calendar-day p { margin: 4px 0; }
.calendar-day small { color: #806f65; }
.no-scroll { overflow: hidden; }
.film-mode { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: #3b2922e8; }
.film-mode[hidden] { display: none; }
.film-panel { width: min(680px, 100%); min-height: min(620px, 90vh); background: #fffaf5; border-radius: 24px; padding: clamp(22px, 5vw, 42px); display: flex; flex-direction: column; }
.film-top { display: flex; justify-content: space-between; align-items: center; color: #806f65; font-weight: 800; }
.film-top button { border: 0; background: #efdbcf; color: #743a2b; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.film-panel h2 { font-size: clamp(1.5rem, 5vw, 2.4rem); margin: 18px 0; }
.film-step { font-size: clamp(1.15rem, 4vw, 1.55rem); line-height: 1.55; flex: 1; }
.film-check { display: flex; align-items: center; gap: 10px; padding: 14px; background: #f6e9df; border-radius: 12px; font-weight: 750; }
.film-check input { width: 22px; height: 22px; accent-color: #a64f38; }
.film-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.film-actions button { flex: 1; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pillars div { padding: 20px; border-radius: 16px; background: #f6e9df; display: grid; gap: 5px; }
.pillars strong { font-size: 1.7rem; color: #a64f38; }
.live-card { border-color: #c9785d; }
.reminders { display: flex; flex-wrap: wrap; gap: 10px; }
.reminders button { border: 1px solid #d2ad99; background: #fffaf5; color: #573b30; padding: 11px 14px; border-radius: 999px; cursor: pointer; }
.note { color: #705d53; }
.history { display: grid; gap: 10px; }
.history-item { display: flex; justify-content: space-between; gap: 18px; padding: 14px; border-radius: 13px; background: #f8eee6; }
.history-item small { color: #806f65; }
.score { color: #a64f38; font-weight: 800; }
.empty { color: #806f65; }
.toast { position: fixed; right: 18px; bottom: 18px; background: #4a2d23; color: #fffaf5; padding: 12px 18px; border-radius: 12px; opacity: 0; transform: translateY(15px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.install-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #eed8ca; }
.install-card h2 { margin-bottom: 5px; }
.install-card p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .hero { align-items: flex-start; }
  .signal { display: none; }
  .tabs { justify-content: flex-start; overflow-x: auto; }
  .tab { padding: 11px 14px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .form-grid, .pillars { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  main { padding: 14px; }
  .history-item { display: grid; }
  .install-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 2rem; }
}
