:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #062a4f; background: #e9f3fa; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
main { width: min(100% - 28px, 760px); margin: 0 auto; padding: 28px 0 60px; }
header { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
header > span { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: linear-gradient(145deg,#003365,#0693e3); border-radius: 15px; font-weight: 900; }
h1,h2,p { margin-top: 0; } h1 { margin-bottom: 0; font-size: clamp(1.7rem,6vw,2.5rem); } h2 { margin: 2px 0 0; }
small { color: #597189; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.lead { color: #456078; font-size: 1.05rem; line-height: 1.6; }
section, aside { margin-top: 18px; padding: 22px; background: #fff; border: 1px solid #d5e5f0; border-radius: 24px; box-shadow: 0 14px 35px rgba(0,51,101,.09); }
.section-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head b { padding: 7px 9px; color: #003365; background: #e1eff8; border-radius: 999px; font-size: .68rem; }
label { display: grid; gap: 7px; color: #344f67; font-weight: 800; }
input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #cbdde9; border-radius: 13px; font: inherit; }
button,.file-button { display: inline-grid; place-items: center; min-height: 46px; padding: 10px 16px; border: 0; border-radius: 13px; color: #fff; background: #003365; font: inherit; font-weight: 850; cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
.file-button { color: #003365; background: #dceef9; }
.file-button input { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 11px; }
.source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.source-option { position: relative; display: grid; place-items: center; gap: 4px; min-height: 118px; padding: 15px 10px; color: #003365; border: 1px solid #bdd8e8; border-radius: 17px; background: #eef7fc; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.source-option:hover,.source-option:focus-within { border-color: #1686c2; background: #e2f3fc; transform: translateY(-1px); }
.source-option > span { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: #fff; font-size: 1.45rem; box-shadow: 0 5px 14px rgba(0,51,101,.09); }
.source-option > b { font-size: .96rem; }
.source-option > small { color: #5d7589; font-size: .68rem; text-transform: none; letter-spacing: 0; }
.source-option > input { position: absolute; width: 1px; height: 1px; min-height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.hint { margin: 12px 0; color: #60778c; font-size: .85rem; line-height: 1.55; }
#preview { display: block; width: 100%; max-height: 340px; margin: 12px 0; object-fit: contain; border-radius: 17px; background: #edf3f7; }
#preview[hidden] { display: none; }
.result { display: grid; gap: 10px; margin-top: 16px; }
.product,.analysis-summary,.food-item,.error { padding: 14px; border: 1px solid #d7e5ee; border-radius: 15px; background: #f7fbfd; }
.product { grid-template-columns: 70px 1fr; align-items: center; }
.product img { width: 62px; height: 62px; object-fit: contain; border-radius: 10px; background: #fff; }
.product strong,.product span,.food-item strong,.food-item span { display: block; }
.food-item { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; }
.food-item small { grid-column: 1 / -1; color: #60778c; text-transform: none; letter-spacing: 0; }
.error { color: #8e2424; background: #fff1f1; border-color: #f1c9c9; }
aside { color: #61490b; background: #fff8df; border-color: #eddc9f; line-height: 1.55; }
aside p { margin: 7px 0 0; }
.back { display: inline-block; margin-top: 22px; color: #003365; font-weight: 850; }
@media (max-width:520px) { section,aside { padding: 17px; border-radius: 19px; } .section-head { align-items: flex-start; } .source-option { min-height: 108px; padding-inline: 7px; } }
