:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2a24;
  background: #f5f1e8;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, textarea, input, select { font: inherit; }
.shell {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}
header { padding: 12px 4px 20px; }
h1 { margin: 4px 0 8px; font-size: clamp(2rem, 8vw, 3.25rem); line-height: .98; letter-spacing: -.045em; }
h2 { margin: 2px 0 0; }
.eyebrow { margin: 0; font-size: .72rem; letter-spacing: .16em; font-weight: 800; color: #68766e; }
.sub { margin: 0; color: #68766e; }
.card {
  background: #fffdf8;
  border: 1px solid #e3ddd0;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 34px rgba(50, 54, 48, .08);
}
.label { display: block; margin: 0 0 7px; font-size: .78rem; font-weight: 750; color: #536159; }
textarea, input, select {
  width: 100%;
  border: 1px solid #d6d0c4;
  background: white;
  border-radius: 14px;
  padding: 13px;
  color: #1f2a24;
}
textarea { resize: vertical; min-height: 132px; line-height: 1.45; }
textarea:focus, input:focus, select:focus { outline: 3px solid rgba(56, 110, 78, .18); border-color: #386e4e; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
button { border: 0; border-radius: 14px; min-height: 48px; padding: 12px 15px; font-weight: 760; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.primary { width: 100%; background: #285e3d; color: white; }
.secondary { background: #e9eee8; color: #254532; }
.full { width: 100%; margin-top: 14px; }
.attachments { margin-top: 12px; padding: 12px; background: #f2f5f0; border-radius: 14px; }
.attachments img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; }
.audio-badge { padding: 10px; font-size: .9rem; font-weight: 700; }
.link-button { min-height: auto; padding: 8px 0 0; background: transparent; color: #855326; }
.status { min-height: 1.3em; margin: 12px 2px 0; color: #68766e; text-align: center; }
.status.error { color: #9f2f2f; }
.result { margin-top: 16px; }
.result-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.calories { text-align: right; }
.calories strong { display: block; font-size: 2.2rem; line-height: 1; }
.calories span, .macros span { color: #68766e; font-size: .78rem; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.macros div { padding: 12px; text-align: center; background: #f2f5f0; border-radius: 14px; }
.macros strong { display: block; }
.summary { line-height: 1.5; }
details { border-top: 1px solid #e4ded2; padding-top: 13px; }
summary { cursor: pointer; font-weight: 700; }
li { margin: 8px 0; }
footer { text-align: center; color: #7b847f; font-size: .75rem; padding: 22px 8px 4px; }
@media (max-width: 390px) { .field-grid { grid-template-columns: 1fr; } }

.login h2 { margin-bottom: 6px; }
.login form { margin-top: 18px; }
.login .primary { margin-top: 12px; }
