:root { color-scheme: light; --ink: #17322a; --green: #12372a; --mint: #e2f1e8; --paper: #fbfaf6; --line: #d9dfda; --red: #9a302e; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
.shell { width: min(980px, calc(100% - 2rem)); margin: 4rem auto; }
.card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.2rem, 4vw, 2.5rem); box-shadow: 0 16px 45px #19362b12; }
.login { max-width: 520px; margin: 10vh auto; }
.eyebrow { color: #39735e; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { line-height: 1.1; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
nav { display: flex; gap: .5rem; margin-bottom: 1rem; overflow: auto; }
nav button { background: transparent; color: var(--green); border: 1px solid var(--line); }
nav button.active { background: var(--green); color: white; }
form { display: grid; gap: 1rem; }
.grid-form { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 2rem; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 650; }
input, select, textarea { width: 100%; padding: .75rem; border: 1px solid #bac7bf; border-radius: 10px; font: inherit; background: white; }
button { cursor: pointer; border: 0; border-radius: 999px; padding: .72rem 1.15rem; background: var(--green); color: white; font-weight: 750; }
.ghost { background: var(--mint); color: var(--green); }
.danger { background: transparent; color: var(--red); padding: .4rem .7rem; }
.list article { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: 1rem 0; }
.list article div { display: grid; gap: .2rem; }
.list span, small { color: #52665e; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.photo-grid article { border: 1px solid var(--line); border-radius: 14px; padding: .7rem; }
.images { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; margin-bottom: .7rem; }
.images img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; }
.error { color: var(--red); min-height: 1.5em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat { background: var(--mint); border-radius: 14px; padding: 1rem; display: grid; gap: .3rem; }
.stat strong { font-size: 1.6rem; }
.habit-check { display: flex; gap: .5rem; align-items: end; }
.habit-check input { width: 100px; }
.children { display: grid; gap: .25rem; margin-top: .4rem; }
.child-row { display: flex; align-items: center; gap: .35rem; }
.child-row button { padding: .1rem .35rem; }
.action-grid { display: flex; flex-wrap: wrap; gap: .7rem; }
dialog { width: min(760px, calc(100% - 1rem)); max-height: 92vh; border: 0; border-radius: 18px; padding: 1.25rem; color: var(--ink); }
dialog::backdrop { background: #071d17aa; }
.workout-exercise { border-top: 1px solid var(--line); padding: 1rem 0; }
.set-row { display: grid; grid-template-columns: 75px 1fr 1fr 1fr auto; gap: .5rem; align-items: end; margin: .5rem 0; }
.set-row input[type="checkbox"] { width: 24px; height: 24px; }
@media (max-width: 600px) { .set-row { grid-template-columns: 60px 1fr 1fr; } }
@media print {
  header, nav, form, button, #app-error { display: none !important; }
  .tab { display: none !important; box-shadow: none; border: 0; }
  #dashboard { display: block !important; }
}
[hidden] { display: none !important; }
@media (max-width: 540px) { .shell { margin: 1rem auto; } .card { border-radius: 14px; } }
