:root{--bg-primary: #0a0a0a;--bg-secondary: #18181b;--bg-tertiary: #1f1f23;--bg-card: #18181b;--bg-item: #1f1f23;--accent: #a78bfa;--accent-glow: rgba(167, 139, 250, .5);--accent-dim: rgba(167, 139, 250, .15);--text-primary: #f0f2f5;--text-secondary: rgba(240, 242, 245, .7);--text-muted: rgba(240, 242, 245, .5);--border: rgba(255, 255, 255, .08);--danger: #ef4444;--warning: #ffc107;--protein: #ff6b6b;--fat: #ffd93d;--carbs: #6bcb77;--dish: #c4b5fd;--ai: #818cf8;--gradient-accent: linear-gradient(135deg, #c084fc 0%, #818cf8 100%)}*{box-sizing:border-box;margin:0;padding:0}html,body{min-height:100%;background:var(--bg-primary)}body{font-family:Manrope,system-ui,sans-serif;color:var(--text-primary);-webkit-overflow-scrolling:touch}#app{min-height:100vh}.screen{display:none;min-height:100vh}.screen.active{display:block}.start-btn{display:flex;align-items:center;justify-content:center;gap:12px;background:var(--accent);color:#000;border:none;padding:16px 48px;border-radius:16px;font-size:18px;font-weight:600;font-family:inherit;cursor:pointer;transition:transform .2s;flex-shrink:0}.start-btn:active{transform:scale(.96)}.start-btn svg{width:24px;height:24px}.toast{position:fixed;bottom:100px;left:50%;transform:translate(-50%) translateY(20px);background:var(--bg-tertiary);padding:10px 20px;border-radius:10px;font-size:13px;opacity:0;transition:all .3s;z-index:200}.toast.show{opacity:1;transform:translate(-50%) translateY(0)}.spinner{width:24px;height:24px;border:2px solid var(--bg-tertiary);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite;margin-bottom:12px}@keyframes spin{to{transform:rotate(360deg)}}.loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;text-align:center}.loading-text{font-size:13px;color:var(--text-muted)}.empty-text{color:var(--text-muted);font-style:italic;font-size:13px}.transcription-text{font-size:14px;line-height:1.6;white-space:pre-wrap}.header{padding:12px 16px;padding-top:calc(56px + env(safe-area-inset-top,0px));background:var(--bg-secondary);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.logo{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px}.logo-icon{width:28px;height:28px;background:linear-gradient(135deg,var(--accent),#00a080);border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:14px}.rec-indicator{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--danger);font-family:JetBrains Mono,monospace}.rec-dot{width:8px;height:8px;background:var(--danger);border-radius:50%;animation:pulse 1s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.4}}#start-screen{flex-direction:column;align-items:center;padding:24px;padding-top:calc(56px + env(safe-area-inset-top,0px));padding-bottom:calc(24px + env(safe-area-inset-bottom,0px));overflow-y:auto}.start-header{text-align:center;margin-bottom:24px;flex-shrink:0}.start-logo{width:80px;height:80px;background:linear-gradient(135deg,var(--accent),#00a080);border-radius:20px;display:flex;align-items:center;justify-content:center;font-size:40px;margin:0 auto 16px;box-shadow:0 8px 40px var(--accent-glow)}.start-title{font-size:24px;font-weight:600;margin-bottom:6px}.start-subtitle{font-size:13px;color:var(--text-muted)}#scan-screen{flex-direction:column}.camera-section{flex:1;display:flex;align-items:center;justify-content:center;padding:12px;background:var(--bg-primary)}.camera-wrapper{position:relative;background:#000;border-radius:16px;overflow:hidden;box-shadow:0 4px 20px #0006;width:100%;max-width:400px;aspect-ratio:9/16;max-height:70vh}#camera{position:relative;width:100%;height:100%;overflow:hidden;background:#000}#camera video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}.scan-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.scan-frame{width:55%;max-width:180px;aspect-ratio:1;border:2px solid rgba(255,255,255,.2);border-radius:12px;position:relative}.scan-frame .corner{position:absolute;width:16px;height:16px;border:3px solid var(--accent)}.corner.tl{top:-2px;left:-2px;border-right:none;border-bottom:none;border-radius:6px 0 0}.corner.tr{top:-2px;right:-2px;border-left:none;border-bottom:none;border-radius:0 6px 0 0}.corner.bl{bottom:-2px;left:-2px;border-right:none;border-top:none;border-radius:0 0 0 6px}.corner.br{bottom:-2px;right:-2px;border-left:none;border-top:none;border-radius:0 0 6px}.scan-line{position:absolute;left:10%;right:10%;height:2px;background:linear-gradient(90deg,transparent,var(--accent),transparent);box-shadow:0 0 10px var(--accent-glow);animation:scanAnim 2s ease-in-out infinite}@keyframes scanAnim{0%,to{top:10%}50%{top:90%}}.success-check{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none}.success-check.show{opacity:1}.success-check .circle{width:50px;height:50px;background:var(--accent);border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 0 30px var(--accent-glow);animation:pop .3s cubic-bezier(.34,1.56,.64,1)}@keyframes pop{0%{transform:scale(0)}to{transform:scale(1)}}.success-check svg{width:28px;height:28px;color:#000}.bottom-panel{display:none!important}.scans-row{display:flex;align-items:center;gap:8px;margin-bottom:12px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}.scans-row::-webkit-scrollbar{display:none}.scan-chip{display:flex;align-items:center;gap:8px;background:var(--bg-tertiary);padding:8px 12px;border-radius:8px;font-size:12px;white-space:nowrap;flex-shrink:0;max-width:200px;transition:opacity .2s,transform .2s}.scan-chip.unknown{border:1px dashed var(--text-muted)}.scan-chip-icon{width:24px;height:24px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.scan-chip-icon.found{background:var(--accent-dim);color:var(--accent)}.scan-chip-icon.unknown{background:#ffc10726;color:var(--warning)}.scan-chip-icon svg{width:14px;height:14px}.scan-chip-text{flex:1;min-width:0;overflow:hidden}.scan-chip-name{font-weight:500;overflow:hidden;text-overflow:ellipsis}.scan-chip-code{font-family:JetBrains Mono,monospace;font-size:10px;color:var(--text-muted)}.scan-chip-delete{width:20px;height:20px;border:none;background:#ff475726;color:var(--danger);border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}.scan-chip-delete svg{width:12px;height:12px}.scan-chip-loading{width:14px;height:14px;border:2px solid var(--bg-secondary);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}.scans-empty{color:var(--text-muted);font-size:12px}.scan-toast{position:absolute;top:110px;left:16px;right:16px;background:linear-gradient(135deg,#00d4aaf2,#00b496f2);border-radius:16px;padding:14px 16px;display:flex;align-items:center;gap:12px;z-index:100;box-shadow:0 8px 32px #00d4aa66;transform:translateY(-150%);opacity:0;transition:all .4s cubic-bezier(.34,1.56,.64,1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.scan-toast.show{transform:translateY(0);opacity:1}.scan-toast.searching{background:linear-gradient(135deg,#373839f2,#28292af2);box-shadow:0 8px 32px #0006}.scan-toast.not-found{background:linear-gradient(135deg,#ffc107f2,#e6aa00f2);box-shadow:0 8px 32px #ffc10766}.scan-toast-icon{width:48px;height:48px;background:#0003;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.scan-toast-icon svg{width:24px;height:24px;color:#000}.scan-toast.searching .scan-toast-icon svg,.scan-toast.not-found .scan-toast-icon svg{color:var(--text-primary)}.scan-toast-icon .spinner{width:24px;height:24px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;margin:0}.scan-toast-content{flex:1;min-width:0}.scan-toast-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#0009;margin-bottom:2px}.scan-toast.searching .scan-toast-title,.scan-toast.not-found .scan-toast-title{color:var(--text-muted)}.scan-toast-name{font-size:16px;font-weight:600;color:#000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scan-toast.searching .scan-toast-name,.scan-toast.not-found .scan-toast-name{color:var(--text-primary)}.scan-toast-badge{background:#0003;padding:6px 12px;border-radius:20px;font-size:14px;font-weight:700;color:#000;flex-shrink:0}.scan-toast.searching .scan-toast-badge,.scan-toast.not-found .scan-toast-badge{color:var(--text-primary)}.scan-counter{position:absolute;top:16px;right:16px;background:#000000b3;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:24px;padding:8px 14px;display:flex;align-items:center;gap:8px;z-index:50;border:1px solid rgba(255,255,255,.1);opacity:0;transform:scale(.8);transition:all .3s cubic-bezier(.34,1.56,.64,1);cursor:pointer}.scan-counter.show{opacity:1;transform:scale(1)}.scan-counter.pulse{animation:counterPulse .5s cubic-bezier(.34,1.56,.64,1)}@keyframes counterPulse{0%,to{transform:scale(1)}50%{transform:scale(1.15)}}.scan-counter-icon{width:20px;height:20px;display:flex;align-items:center;justify-content:center}.scan-counter-icon svg{width:18px;height:18px;color:var(--accent)}.scan-counter-value{font-family:JetBrains Mono,monospace;font-size:16px;font-weight:700;color:var(--text-primary);min-width:20px;text-align:center}.scan-sheet{position:absolute;bottom:0;left:0;right:0;background:var(--bg-secondary);border-radius:24px 24px 0 0;z-index:80;transform:translateY(calc(100% - 160px));transition:transform .4s cubic-bezier(.4,0,.2,1);max-height:75vh;display:flex;flex-direction:column;box-shadow:0 -8px 32px #00000080;padding-bottom:env(safe-area-inset-bottom,0px)}.scan-sheet.expanded{transform:translateY(0)}.scan-sheet-handle{padding:12px 16px;display:flex;justify-content:center;cursor:grab;touch-action:none}.scan-sheet-handle:active{cursor:grabbing}.scan-sheet.expanded .scan-sheet-handle .scan-sheet-swipe-hint{display:none}.scan-sheet-collapsed{display:flex;flex-direction:column;padding:0 16px 16px;gap:12px}.scan-sheet.expanded .scan-sheet-collapsed{display:none}.scan-sheet-summary{display:flex;align-items:center;justify-content:center;gap:8px;font-size:15px;font-weight:500}.scan-sheet-count{background:var(--accent);color:#000;padding:2px 10px;border-radius:12px;font-size:14px;font-weight:700;min-width:28px;text-align:center}.scan-sheet-swipe-hint{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--text-muted);font-size:12px;animation:pulseHint 2s ease-in-out infinite}.scan-sheet-swipe-hint svg{width:16px;height:16px}@keyframes pulseHint{0%,to{opacity:.5;transform:translateY(0)}50%{opacity:1;transform:translateY(-2px)}}.scan-sheet-collapsed .done-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--accent);color:#000;border:none;padding:14px 24px;border-radius:14px;font-size:16px;font-weight:600;font-family:inherit;cursor:pointer;transition:transform .2s,opacity .2s}.scan-sheet-collapsed .done-btn:active{transform:scale(.98);opacity:.9}.scan-sheet-collapsed .done-btn svg{width:20px;height:20px}.scan-sheet-expanded{display:none;flex-direction:column;flex:1;min-height:0}.scan-sheet.expanded .scan-sheet-expanded{display:flex}.scan-sheet-header{display:flex;align-items:center;justify-content:space-between;padding:0 16px 12px;border-bottom:1px solid var(--border)}.scan-sheet-title{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:600}.scan-sheet-count-expanded{background:var(--accent);color:#000;padding:2px 10px;border-radius:12px;font-size:13px;font-weight:700}.scan-sheet-clear{background:transparent;border:none;color:var(--danger);font-size:13px;font-weight:500;cursor:pointer;padding:6px 12px;border-radius:8px;transition:background .2s}.scan-sheet-clear:active{background:#ff47571a}.scan-sheet-list{flex:1;overflow-y:auto;padding:12px 16px;-webkit-overflow-scrolling:touch}.scan-sheet-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;color:var(--text-muted);text-align:center;gap:12px}.scan-sheet-empty svg{width:48px;height:48px;opacity:.5}.scan-sheet-empty span{font-size:16px;font-weight:500}.scan-sheet-actions{padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--border)}.done-btn-expanded{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--accent);color:#000;border:none;padding:14px 24px;border-radius:14px;font-size:16px;font-weight:600;font-family:inherit;cursor:pointer;transition:transform .2s,opacity .2s}.done-btn-expanded:active{transform:scale(.98);opacity:.9}.done-btn-expanded svg{width:20px;height:20px}.scan-item{display:flex;align-items:center;gap:12px;background:var(--bg-tertiary);padding:12px;border-radius:12px;margin-bottom:8px;animation:slideIn .3s cubic-bezier(.34,1.56,.64,1)}@keyframes slideIn{0%{opacity:0;transform:translate(-20px)}to{opacity:1;transform:translate(0)}}.scan-item:last-child{margin-bottom:0}.scan-item-icon{width:44px;height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.scan-item-icon.found{background:var(--accent-dim);color:var(--accent)}.scan-item-icon.unknown{background:#ffc10726;color:var(--warning)}.scan-item-icon.loading{background:var(--bg-secondary)}.scan-item-icon svg{width:22px;height:22px}.scan-item-icon .spinner{width:22px;height:22px;margin:0}.scan-item-content{flex:1;min-width:0}.scan-item-name{font-size:14px;font-weight:500;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scan-item-meta{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-muted)}.scan-item-code{font-family:JetBrains Mono,monospace}.scan-item-status{display:flex;align-items:center;gap:4px}.scan-item-status.found{color:var(--accent)}.scan-item-status.unknown{color:var(--warning)}.scan-item-nutrients{display:flex;gap:8px;margin-top:6px}.scan-item-nutrient{font-size:11px;padding:2px 6px;background:var(--bg-secondary);border-radius:4px}.scan-item-nutrient.cal{color:var(--accent)}.scan-item-nutrient.pro{color:var(--protein)}.scan-item-nutrient.fat{color:var(--fat)}.scan-item-nutrient.carb{color:var(--carbs)}.scan-item-delete{width:36px;height:36px;border:none;background:#ff47571a;color:var(--danger);border-radius:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .2s}.scan-item-delete:active{background:#ff475733}.scan-item-delete svg{width:18px;height:18px}.zoom-control{position:fixed;bottom:calc(16px + env(safe-area-inset-bottom,0px));right:16px;display:flex;align-items:center;gap:8px;background:#000000b3;padding:10px 14px;border-radius:24px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:900;border:1px solid rgba(255,255,255,.1);box-shadow:0 8px 24px #00000059;pointer-events:auto}.zoom-btn{width:28px;height:28px;border:none;background:var(--bg-tertiary);color:var(--text-primary);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:16px;font-weight:600}.zoom-btn:active{transform:scale(.9)}.zoom-btn:disabled{opacity:.4;cursor:not-allowed}.zoom-value{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--text-primary);min-width:36px;text-align:center}.results-container{width:100%;max-width:500px;margin-bottom:24px}.result-block{background:var(--bg-secondary);border-radius:16px;margin-bottom:16px;overflow:hidden}.result-header{padding:12px 16px;background:var(--bg-tertiary);border-bottom:1px solid var(--border);font-size:13px;font-weight:600;display:flex;align-items:center;gap:8px}.result-header svg{width:16px;height:16px;color:var(--accent)}.result-body{padding:12px}.product-card{background:var(--bg-tertiary);border-radius:12px;padding:12px;margin-bottom:10px;transition:all .2s}.product-card:last-child{margin-bottom:0}.product-card.unknown{border:1px dashed var(--warning);cursor:pointer}.product-card.unknown:hover{background:#ffc1071a}.product-card.recognized{border:1px solid transparent}.product-header{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px}.product-icon{width:36px;height:36px;background:var(--accent-dim);border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.product-icon svg{width:18px;height:18px;color:var(--accent)}.product-icon.unknown{background:#ffc10726}.product-icon.unknown svg{color:var(--warning)}.product-info{flex:1;min-width:0}.product-name{font-size:14px;font-weight:500;margin-bottom:2px}.product-meta{font-size:11px;color:var(--text-muted)}.product-action{display:flex;align-items:center;gap:6px;background:var(--warning);color:#000;padding:6px 10px;border-radius:8px;font-size:11px;font-weight:600;cursor:pointer;border:none}.product-action svg{width:14px;height:14px}.product-remove{width:28px;height:28px;border:none;background:#ff475733;color:var(--danger);border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}.product-remove svg{width:14px;height:14px}.product-amount{display:flex;align-items:center;gap:6px;background:var(--bg-secondary);padding:6px 10px;border-radius:8px;font-size:13px}.product-amount input{width:50px;background:transparent;border:none;color:var(--text-primary);font-family:JetBrains Mono,monospace;font-size:13px;text-align:right;outline:none}.product-amount select{background:transparent;border:none;color:var(--text-muted);font-family:inherit;font-size:11px;outline:none;cursor:pointer}.nutrients-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.nutrient-box{background:var(--bg-secondary);border-radius:8px;padding:8px;text-align:center}.nutrient-label{font-size:10px;color:var(--text-muted);margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px}.nutrient-value{font-family:JetBrains Mono,monospace;font-size:14px;font-weight:500}.nutrient-box.calories .nutrient-value{color:var(--accent)}.nutrient-box.protein .nutrient-value{color:var(--protein)}.nutrient-box.fat .nutrient-value{color:var(--fat)}.nutrient-box.carbs .nutrient-value{color:var(--carbs)}.nutrient-box input{width:100%;background:transparent;border:none;color:inherit;font-family:JetBrains Mono,monospace;font-size:14px;font-weight:500;text-align:center;outline:none}.totals-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:12px;background:var(--bg-tertiary);border-top:1px solid var(--border)}.total-box{text-align:center}.total-label{font-size:10px;color:var(--text-muted);margin-bottom:4px}.total-value{font-family:JetBrains Mono,monospace;font-size:16px;font-weight:600}.total-box.calories .total-value{color:var(--accent)}.total-box.protein .total-value{color:var(--protein)}.total-box.fat .total-value{color:var(--fat)}.total-box.carbs .total-value{color:var(--carbs)}.weight-fields{display:flex;gap:12px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.weight-field{flex:1;display:flex;align-items:center;gap:8px}.weight-label{font-size:11px;color:var(--text-muted);white-space:nowrap}.weight-input-wrap{display:flex;align-items:center;gap:4px;background:var(--bg-secondary);border-radius:6px;padding:4px 8px;flex:1}.weight-input{width:100%;min-width:40px;background:transparent;border:none;color:var(--text-primary);font-family:JetBrains Mono,monospace;font-size:12px;text-align:right;outline:none}.weight-input::placeholder{color:var(--text-muted);opacity:.5}.weight-unit{font-size:11px;color:var(--text-muted)}.modal-overlay{position:fixed;inset:0;background:#000c;display:none;align-items:center;justify-content:center;z-index:1000;padding:20px}.modal-overlay.active{display:flex}.modal{background:var(--bg-secondary);border-radius:20px;width:100%;max-width:400px;max-height:90vh;overflow-y:auto}.modal-header{padding:16px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.modal-title{font-size:16px;font-weight:600}.modal-close{width:32px;height:32px;background:var(--bg-tertiary);border:none;border-radius:8px;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center}.modal-close svg{width:18px;height:18px}.modal-body{padding:16px}.modal-step{display:none}.modal-step.active{display:block}.modal-text{font-size:14px;color:var(--text-muted);margin-bottom:16px;line-height:1.5}.modal-barcode{background:var(--bg-tertiary);padding:16px;border-radius:12px;text-align:center;margin-bottom:16px}.modal-barcode-label{font-size:11px;color:var(--text-muted);margin-bottom:6px}.modal-barcode-value{font-family:JetBrains Mono,monospace;font-size:18px;font-weight:600}.modal-barcode-input{width:100%;background:var(--bg-secondary);border:1px solid var(--border);color:var(--text-primary);font-family:JetBrains Mono,monospace;font-size:18px;font-weight:600;text-align:center;padding:12px;border-radius:8px;outline:none;margin-top:8px}.modal-barcode-input:focus{border-color:var(--accent)}.modal-buttons{display:flex;flex-direction:column;gap:10px}.modal-btn{width:100%;padding:14px;border-radius:12px;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;border:none;display:flex;align-items:center;justify-content:center;gap:8px}.modal-btn.primary{background:var(--accent);color:#000}.modal-btn.secondary{background:var(--bg-tertiary);color:var(--text-primary)}.modal-btn svg{width:18px;height:18px}.label-upload-area{border:1px dashed var(--border);border-radius:12px;padding:24px 16px;text-align:center;margin-bottom:16px;color:var(--text-muted)}.label-upload-area strong{color:var(--text-primary);display:block;margin-bottom:6px}.label-preview{width:100%;border-radius:12px;margin-bottom:16px}.modal-loading{display:flex;flex-direction:column;align-items:center;padding:40px 20px;text-align:center}.modal-loading .spinner{width:40px;height:40px;margin-bottom:16px}.modal-success{text-align:center;padding:20px}.modal-success-icon{width:60px;height:60px;background:var(--accent);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 16px}.modal-success-icon svg{width:30px;height:30px;color:#000}.modal-field{margin-bottom:10px}.modal-field-label{display:block;font-size:11px;color:var(--text-muted);margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px}.modal-field-input{width:100%;background:var(--bg-tertiary);border:1px solid var(--border);color:var(--text-primary);font-family:inherit;font-size:14px;padding:10px 12px;border-radius:8px;outline:none;transition:border-color .2s,background-color .2s}.modal-field-input:focus{border-color:var(--accent)}.modal-field-input::placeholder{color:var(--text-muted)}.modal-field.error .modal-field-input{border-color:var(--danger);background:#ff47571a}.modal-field.error .modal-field-label{color:var(--danger)}.modal-nutrition-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.modal-field-input[type=number]{font-family:JetBrains Mono,monospace}.modal-tabs{display:flex;gap:8px;margin-bottom:16px}.modal-tab{flex:1;padding:10px;border-radius:8px;font-size:13px;font-weight:500;background:var(--bg-tertiary);border:1px solid var(--border);color:var(--text-muted);cursor:pointer;text-align:center;transition:all .2s}.modal-tab.active{background:var(--accent-dim);border-color:var(--accent);color:var(--accent)}.modal-tab-content{display:none}.modal-tab-content.active{display:block}.action-sheet-overlay{position:fixed;inset:0;background:#0009;display:none;align-items:flex-end;justify-content:center;z-index:1100;padding:0}.action-sheet-overlay.active{display:flex}.action-sheet{background:var(--bg-secondary);border-radius:20px 20px 0 0;width:100%;max-width:500px;padding:20px;padding-bottom:calc(20px + env(safe-area-inset-bottom,0px));animation:slideUp .3s ease-out}@keyframes slideUp{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.action-sheet-header{text-align:center;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--border)}.action-sheet-title{font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.action-sheet-subtitle{font-size:13px;color:var(--text-muted)}.action-sheet-actions{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}.action-sheet-btn{display:flex;align-items:center;gap:14px;width:100%;padding:16px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:14px;cursor:pointer;text-align:left;transition:all .2s}.action-sheet-btn:active{transform:scale(.98);background:var(--bg-primary)}.action-sheet-btn svg{width:24px;height:24px;flex-shrink:0;color:var(--text-muted)}.action-sheet-btn-primary{background:var(--accent-dim);border-color:var(--accent)}.action-sheet-btn-primary svg{color:var(--accent)}.action-sheet-btn-content{display:flex;flex-direction:column;gap:2px}.action-sheet-btn-title{font-size:15px;font-weight:500;color:var(--text-primary)}.action-sheet-btn-desc{font-size:13px;color:var(--text-muted)}.action-sheet-cancel{width:100%;padding:16px;background:var(--bg-tertiary);border:none;border-radius:14px;font-size:15px;font-weight:500;color:var(--text-muted);cursor:pointer;transition:all .2s}.action-sheet-cancel:active,#dashboard-screen{background:var(--bg-primary)}.dashboard-header{padding:20px 16px 12px;padding-top:calc(56px + env(safe-area-inset-top,0px))}.dashboard-header-top{display:flex;justify-content:space-between;align-items:flex-start}.dashboard-header-left{flex:1}.dashboard-title{font-size:28px;font-weight:700;margin-bottom:4px}.dashboard-date{font-size:15px;font-weight:600;color:var(--text-primary);min-width:100px;text-align:center}.date-navigation{display:flex;align-items:center;gap:8px}.date-nav-btn{width:32px;height:32px;border-radius:50%;border:none;background:var(--bg-secondary);color:var(--text-muted);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s}.date-nav-btn:active{transform:scale(.92);background:var(--bg-tertiary)}.date-nav-btn svg{width:18px;height:18px}.dashboard-header-right{display:flex;align-items:center;gap:8px}.header-btn{width:40px;height:40px;border-radius:50%;border:none;background:var(--bg-secondary);color:var(--text-primary);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .2s,transform .2s}.header-btn:active{transform:scale(.95);background:var(--bg-tertiary)}.header-btn svg{width:20px;height:20px}.profile-btn{width:40px;height:40px;border-radius:50%;border:none;background:var(--bg-secondary);color:var(--text-primary);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .2s,transform .2s}.profile-btn:active{transform:scale(.95);background:var(--bg-tertiary)}.profile-btn svg{width:20px;height:20px}.profile-modal{max-width:320px}.profile-avatar{width:80px;height:80px;border-radius:50%;background:var(--bg-tertiary);display:flex;align-items:center;justify-content:center;margin:0 auto 20px}.profile-avatar svg{width:40px;height:40px;color:var(--text-muted)}.profile-field{background:var(--bg-tertiary);border-radius:12px;padding:12px 16px;display:flex;align-items:center;gap:12px}.profile-field-label{font-size:12px;color:var(--text-muted);margin-bottom:4px}.profile-field-value{flex:1;font-size:15px;font-weight:500;font-family:SF Mono,Menlo,monospace;word-break:break-all}.profile-copy-btn{width:36px;height:36px;border-radius:8px;border:none;background:var(--bg-secondary);color:var(--text-muted);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .2s,color .2s}.profile-copy-btn:active{background:var(--accent);color:#000}.dashboard-content{padding:0 16px 24px}.summary-card{background:var(--bg-secondary);border-radius:16px;padding:12px;margin-bottom:12px}.summary-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.summary-title{font-size:15px;font-weight:600}.summary-settings-btn{width:28px;height:28px;background:var(--bg-tertiary);border:none;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s;padding:0}.summary-settings-btn:hover{background:#2a2a2e}.summary-settings-btn:active{transform:scale(.95)}.summary-settings-btn svg{width:14px;height:14px;color:#ffffff80}.calories-card{background:linear-gradient(135deg,#a78bfa33,#818cf81a);border-radius:12px;padding:12px;margin-bottom:10px;display:flex;align-items:center;gap:14px}.calories-ring{position:relative;width:64px;height:64px;flex-shrink:0}.calories-ring svg{width:100%;height:100%;transform:rotate(-90deg)}.ring-bg{fill:none;stroke:#ffffff1a;stroke-width:6}.ring-progress{fill:none;stroke:var(--accent);stroke-width:6;stroke-linecap:round;stroke-dasharray:251;stroke-dashoffset:251;transition:stroke-dashoffset .5s ease}.ring-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:13px;font-weight:800;color:#fff}.calories-info{flex:1}.calories-eaten{font-size:24px;font-weight:800;margin-bottom:0;line-height:1.1}.calories-eaten .calories-unit{font-size:11px;font-weight:500;color:#ffffff80}.calories-sub{font-size:11px;color:#ffffff80}.calories-meta{display:flex;gap:12px;margin-top:6px}.meta-item{display:flex;flex-direction:column}.meta-value{font-size:13px;font-weight:600}.meta-label{font-size:10px;color:#ffffff80}.macros-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.macro-card{border-radius:10px;padding:10px 8px;text-align:center}.macro-card.carbs{background:linear-gradient(180deg,#f472b626,#f472b60d)}.macro-card.protein{background:linear-gradient(180deg,#60a5fa26,#60a5fa0d)}.macro-card.fat{background:linear-gradient(180deg,#fbbf2426,#fbbf240d)}.macro-card .macro-value{font-size:14px;font-weight:700}.macro-card.carbs .macro-value{color:#f472b6}.macro-card.protein .macro-value{color:#60a5fa}.macro-card.fat .macro-value{color:#fbbf24}.macro-card .macro-label{font-size:9px;color:#ffffff80;margin-top:1px}.macro-card .macro-bar{height:3px;background:#ffffff1a;border-radius:2px;overflow:hidden;margin-top:6px}.macro-bar-fill{height:100%;border-radius:2px;transition:width .3s ease;width:0}.macro-card.carbs .macro-bar-fill{background:#f472b6}.macro-card.protein .macro-bar-fill{background:#60a5fa}.macro-card.fat .macro-bar-fill{background:#fbbf24}.macro-card .macro-goal{font-size:10px;color:#ffffff80;margin-top:4px}.calories-card.overlimit,.macro-card.overlimit{animation:pulse-glow 2s ease-in-out infinite}@keyframes pulse-glow{0%,to{box-shadow:0 0 #ef444400}50%{box-shadow:0 0 0 3px #ef444466}}.calories-card.overlimit .ring-progress{stroke-dashoffset:0!important;stroke:var(--danger)}.meta-value.over{color:var(--danger)}.macros-row{display:flex;gap:12px}.macro-item{flex:1;text-align:center}.macro-fill{height:100%;border-radius:2px;transition:width .3s ease;width:0}.macro-fill.carbs{background:#f472b6}.macro-fill.protein{background:#60a5fa}.macro-fill.fat{background:#fbbf24}.macro-value{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--text-muted)}.meals-section{margin-bottom:20px}.meals-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.meals-title{font-size:15px;font-weight:600}.meals-list{display:flex;flex-direction:column;gap:10px}.meal-card-wrapper{position:relative;background:var(--bg-card);border-radius:14px;overflow:hidden}.meal-header{background:var(--bg-card);display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;position:relative;z-index:2;-webkit-user-select:none;user-select:none}.meal-card-wrapper.expanded .meal-header{border-radius:14px 14px 0 0}.meal-icon-wrapper{position:relative;flex-shrink:0}.meal-icon{width:40px;height:40px;background:linear-gradient(145deg,#232328,#1a1a1e);border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:18px}.meal-badge{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;background:var(--accent);border-radius:8px;font-size:9px;font-weight:700;color:#000;display:flex;align-items:center;justify-content:center;padding:0 3px}.meal-info{flex:1;min-width:0}.meal-name{font-size:14px;font-weight:700;margin-bottom:1px}.meal-stats{display:flex;align-items:baseline;gap:10px}.meal-calories{font-size:16px;font-weight:800;color:var(--accent)}.meal-calories .unit{font-size:10px;font-weight:500;color:var(--text-muted)}.meal-macros{font-size:10px;color:var(--text-muted)}.meal-macros strong{color:var(--text-secondary)}.meal-add-btn{width:36px;height:36px;border:none;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#000;cursor:pointer;flex-shrink:0;background:var(--gradient-accent);transition:transform .15s,box-shadow .15s}.meal-add-btn:active{transform:scale(.95)}.meal-add-btn svg{width:16px;height:16px}.expand-zone-header{height:22px;display:flex;align-items:center;justify-content:center;cursor:pointer;background:linear-gradient(180deg,transparent 0%,rgba(167,139,250,.005) 30%,rgba(167,139,250,.02) 50%,rgba(167,139,250,.04) 70%,rgba(167,139,250,.06) 85%,rgba(167,139,250,.08) 100%)}.expand-zone-header svg{width:16px;height:16px;color:var(--accent);opacity:.4}.meal-card-wrapper.expanded .expand-zone-header{display:none}.items-wrapper{position:relative;margin:0 10px;padding-top:10px;background:var(--bg-item);border-radius:0 0 12px 12px;display:none}.meal-card-wrapper.expanded .items-wrapper{display:block}.meal-card-wrapper.expanded{background:transparent}.meal-card-wrapper.expanded .meal-header{background:var(--bg-card);border-radius:14px}.items-list{padding:0 0 8px}.item-container{position:relative;overflow:hidden}.meal-item{position:relative;display:flex;align-items:center;gap:10px;padding:10px 16px;background:var(--bg-item);cursor:pointer;transition:transform .2s ease-out;-webkit-user-select:none;user-select:none;border-bottom:1px solid rgba(255,255,255,.05)}.item-container:last-child .meal-item{border-bottom:none}.items-list>.item-container:first-child .meal-item{padding-top:4px}.meal-item-content{flex:1;min-width:0}.meal-item-top{display:flex;align-items:center;gap:6px}.meal-item-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-primary)}.meal-item-meta{font-size:11px;color:var(--text-muted);margin-top:1px}.meal-item-right{display:flex;align-items:center;gap:6px;flex-shrink:0}.meal-item-calories{font-size:13px;font-weight:700;color:var(--accent);min-width:36px;text-align:right}.meal-item-tag{font-size:8px;font-weight:800;padding:3px 6px;border-radius:4px;text-transform:uppercase;letter-spacing:.5px;flex-shrink:0}.meal-item-tag.dish{background:var(--dish);color:#1a1a1e}.meal-item-tag.ai{background:var(--ai);color:#000}.meal-item-ai-badge{font-size:8px;font-weight:800;padding:3px 6px;background:var(--ai);color:#000;border-radius:4px;text-transform:uppercase;letter-spacing:.5px;flex-shrink:0}.meal-item-dish-badge{font-size:8px;font-weight:800;padding:3px 6px;background:var(--dish);color:#1a1a1e;border-radius:4px;text-transform:uppercase;letter-spacing:.5px;flex-shrink:0}.item-container.is-dish{background:#c4b5fd1a;border-left:3px solid var(--dish)}.item-container.is-dish .meal-item{background:transparent;border-bottom:none}.item-container.is-ai{background:#818cf81a;border-left:3px solid var(--ai)}.item-container.is-ai .meal-item{background:transparent}.meal-item-expand-indicator{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:4px;transition:background .15s;flex-shrink:0}.meal-item-expand-indicator:hover{background:#c4b5fd33}.meal-item-expand-indicator svg{width:14px;height:14px;color:var(--dish);transition:transform .2s}.meal-item-dish-wrapper.expanded .meal-item-expand-indicator svg{transform:rotate(180deg)}.meal-item-dish-ingredients{background:#c4b5fd0d;padding:0 16px 0 32px;border-left:3px solid var(--dish);max-height:0;overflow:hidden;transition:max-height .25s ease-out,padding .25s ease-out}.meal-item-dish-ingredients.open{max-height:500px;padding:4px 16px 4px 32px}.meal-item-dish-ingredient{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.03);font-size:12px;color:var(--text-muted);cursor:pointer;transition:color .15s}.meal-item-dish-ingredient:last-child{border-bottom:none}.meal-item-dish-ingredient:hover{color:var(--text-primary)}.meal-item-dish-ingredient-name{flex:1;display:flex;align-items:center;gap:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.meal-item-dish-ingredient-weight{font-family:JetBrains Mono,monospace;background:var(--bg-tertiary);padding:2px 6px;border-radius:4px;font-size:10px;margin-left:8px}.meal-item-dish-ingredient-kcal{font-family:JetBrains Mono,monospace;color:var(--accent);opacity:.7;font-weight:600;font-size:11px;min-width:36px;text-align:right;margin-left:8px}.delete-zone{position:absolute;right:0;top:0;bottom:0;width:72px;background:var(--bg-item);display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .2s}.item-container.swiped .delete-zone{opacity:1;pointer-events:auto}.item-container.is-dish .delete-zone{background:#c4b5fd1a}.item-container.is-ai .delete-zone{background:#818cf81a}.delete-btn{width:44px;height:44px;background:var(--danger);border-radius:50%;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .15s,box-shadow .15s}.delete-btn:hover{transform:scale(1.08);box-shadow:0 4px 12px #ef444466}.delete-btn svg{width:20px;height:20px;color:#fff}.collapse-zone{height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;background:linear-gradient(180deg,var(--bg-item) 0%,rgba(167,139,250,.03) 50%,rgba(167,139,250,.08) 100%);border-radius:0 0 14px 14px;gap:6px}.collapse-zone svg{width:16px;height:16px;color:var(--accent);opacity:.4;transform:rotate(180deg)}.collapse-zone .hint{font-size:10px;color:#ffffff40;font-weight:500}.meal-items-empty{font-size:12px;color:var(--text-muted);padding:8px 0;text-align:center}.meal-item-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.meal-item-details{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--text-muted);margin-top:4px}.meal-item-amount{font-family:JetBrains Mono,monospace;background:var(--bg-tertiary);padding:2px 6px;border-radius:4px}.meal-item-macro{font-family:JetBrains Mono,monospace}.meal-item.editable{cursor:pointer}.meal-item.editable:active{background:#ffffff0d}.meal-item.is-dish{background:#c4b5fd14;border-left:3px solid var(--dish);margin-left:-12px;padding-left:12px;border-radius:0}.add-food-modal{max-width:340px}.add-methods{display:flex;flex-direction:column;gap:10px}.add-method-btn{display:flex;align-items:center;gap:14px;background:var(--bg-tertiary);border:none;padding:16px;border-radius:12px;cursor:pointer;text-align:left;transition:background .2s}.add-method-btn:active{background:var(--accent-dim)}.add-method-btn.add-method-btn-accent{background:var(--accent-dim);border:1px solid var(--accent)}.add-method-btn.add-method-btn-accent:active{background:var(--accent)}.add-method-btn.add-method-btn-accent:active .method-title,.add-method-btn.add-method-btn-accent:active .method-desc{color:#000}.method-icon{width:44px;height:44px;background:var(--accent-dim);border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.method-icon svg{width:22px;height:22px;color:var(--accent)}.method-text{flex:1}.method-title{font-size:14px;font-weight:500;color:var(--text-primary);margin-bottom:2px}.method-desc{font-size:12px;color:var(--text-muted)}.back-btn{width:40px;height:40px;background:transparent;border:none;color:var(--text-primary);display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:10px}.back-btn:active{background:var(--bg-tertiary)}.back-btn svg{width:24px;height:24px}#results-screen{flex-direction:column;overflow:hidden}.results-content{flex:1;overflow-y:auto;padding:16px;-webkit-overflow-scrolling:touch}.results-actions{padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px));background:var(--bg-secondary);border-top:1px solid var(--border)}.save-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--accent);color:#000;border:none;padding:14px;border-radius:12px;font-size:16px;font-weight:600;font-family:inherit;cursor:pointer}.save-btn:active{transform:scale(.98)}.save-btn:disabled{opacity:.5;cursor:not-allowed}.save-btn svg{width:20px;height:20px}.search-modal{max-height:85vh;display:flex;flex-direction:column}.search-input-wrap{position:relative;padding:0 16px 16px}.search-input-wrap .search-icon{position:absolute;left:28px;top:50%;transform:translateY(calc(-50% - 8px));width:20px;height:20px;color:var(--text-muted);pointer-events:none}.search-input-wrap input{width:100%;padding:14px 44px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:12px;color:var(--text-primary);font-size:16px;font-family:inherit;outline:none}.search-input-wrap input:focus{border-color:var(--accent)}.search-input-wrap input::placeholder{color:var(--text-muted)}.search-input-wrap input{padding-right:80px}.search-scan-btn{position:absolute;right:56px;top:50%;transform:translateY(calc(-50% - 8px));width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--accent);border:none;border-radius:8px;color:#000;cursor:pointer;transition:all .2s}.search-scan-btn:active{transform:translateY(calc(-50% - 8px)) scale(.95)}.search-scan-btn svg{width:18px;height:18px}.search-clear{position:absolute;right:24px;top:50%;transform:translateY(calc(-50% - 8px));width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:none;border:none;color:var(--text-muted);cursor:pointer;opacity:0;transition:opacity .2s}.search-clear.visible{opacity:1}.search-clear svg{width:16px;height:16px}.search-results{flex:1;overflow-y:auto;padding:0 16px 16px;-webkit-overflow-scrolling:touch}.search-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:var(--text-muted);text-align:center;gap:12px}.search-empty svg{width:48px;height:48px;opacity:.5}.marquee{position:relative;overflow:hidden;white-space:nowrap;text-overflow:clip}.marquee .marquee-text{display:inline-block}@keyframes marquee-scroll{0%{transform:translate(0)}to{transform:translate(-100%)}}@media(prefers-reduced-motion:reduce){.marquee .marquee-text{animation:none;padding-left:0}}.add-product-modal{max-width:360px}.add-product-info{padding:0 16px 16px;font-size:13px;color:var(--text-muted)}.add-product-form{padding:0 16px 16px}.quantity-input-group{display:flex;gap:8px;margin-bottom:16px}.quantity-input-group input{flex:1;padding:14px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:12px;color:var(--text-primary);font-size:18px;font-weight:600;font-family:inherit;text-align:center;outline:none}.quantity-input-group input:focus{border-color:var(--accent)}.quantity-input-group select{width:110px;padding:14px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:12px;color:var(--text-primary);font-size:14px;font-family:inherit;outline:none;cursor:pointer}.edit-entry-unit-text{display:flex;align-items:center;justify-content:center;width:110px;padding:14px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:12px;color:var(--text-secondary);font-size:14px}.add-product-nutrition{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:16px;padding:12px;background:var(--bg-tertiary);border-radius:12px}.add-product-nutrition .nutr-item{text-align:center}.add-product-nutrition .nutr-value{font-size:16px;font-weight:600;color:var(--text-primary)}.add-product-nutrition .nutr-label{font-size:11px;color:var(--text-muted);margin-top:2px}.add-product-nutrition .nutr-item.kcal .nutr-value{color:var(--accent)}.add-product-modal-v2{max-width:360px}.add-product-modal-v2 .modal-body{padding:16px}.product-info-card{display:flex;align-items:flex-start;gap:12px;padding:12px;background:var(--bg-tertiary);border-radius:12px;margin-bottom:16px}.product-info-card .product-details{flex:1;min-width:0}.product-info-card .product-name{font-size:14px;font-weight:500;line-height:1.35;word-wrap:break-word;overflow-wrap:break-word}.product-info-card .product-brand{font-size:12px;color:var(--text-muted);margin-top:4px}.product-info-card .product-brand:empty{display:none}.product-info-card .product-stats{text-align:right;flex-shrink:0}.product-info-card .product-kcal{font-family:JetBrains Mono,monospace;font-size:18px;font-weight:600;color:var(--accent)}.product-info-card .product-kcal-label{font-size:10px;color:var(--text-muted)}.product-info-card .product-weight{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--text-muted);margin-top:4px}.quantity-row{display:flex;gap:8px;margin-bottom:12px}.stepper{display:flex;align-items:center;background:var(--bg-tertiary);border-radius:10px;overflow:hidden}.stepper-btn{width:40px;height:40px;background:transparent;border:none;color:var(--accent);font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s}.stepper-btn:active{background:var(--accent);color:#000}.stepper-value{width:50px;text-align:center;font-family:JetBrains Mono,monospace;font-size:16px;font-weight:600;background:transparent;border:none;color:var(--text-primary);outline:none;-moz-appearance:textfield}.stepper-value::-webkit-outer-spin-button,.stepper-value::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.unit-chips{display:flex;gap:6px;flex:1}.unit-chip{flex:1;height:40px;display:flex;align-items:center;justify-content:center;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:10px;color:var(--text-muted);font-size:13px;font-family:inherit;cursor:pointer;transition:all .15s}.unit-chip:active{transform:scale(.95)}.unit-chip.active{border-color:var(--accent);color:var(--accent);background:#a78bfa1a}.macros-inline{display:grid;grid-template-columns:repeat(3,1fr);padding:12px;background:var(--bg-tertiary);border-radius:10px;margin-bottom:16px;font-size:13px;color:var(--text-muted)}.macros-inline .macro-item{display:flex;align-items:center;justify-content:center;gap:4px}.macros-inline .macro-letter{font-weight:600}.btn-primary{width:100%;padding:14px;border-radius:12px;font-size:14px;font-weight:600;font-family:inherit;border:none;cursor:pointer;background:var(--accent);color:#000;transition:all .15s}.btn-primary:active{transform:scale(.98)}#search-scan-overlay{position:fixed;inset:0;background:#000000f2;z-index:10000;display:flex;align-items:center;justify-content:center}.search-scan-container{position:relative;width:100%;max-width:400px;aspect-ratio:1}.search-scan-container video{width:100%;height:100%;object-fit:cover;border-radius:16px}.search-scan-frame{position:absolute;inset:20%;border:2px solid var(--accent);border-radius:12px;pointer-events:none}.search-scan-frame:before{content:"";position:absolute;top:50%;left:0;right:0;height:2px;background:var(--accent);animation:scan-line 2s linear infinite}@keyframes scan-line{0%,to{opacity:.3}50%{opacity:1}}.search-scan-close{position:absolute;top:-50px;right:10px;width:44px;height:44px;background:var(--bg-secondary);border:none;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text-primary)}.search-scan-close svg{width:24px;height:24px}.bottom-nav{position:fixed;bottom:0;left:0;right:0;display:flex;background:var(--bg-secondary);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom,0px);z-index:1000}.bottom-nav-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:12px 0;background:none;border:none;color:var(--text-muted);cursor:pointer;transition:color .2s}.bottom-nav-item svg{width:24px;height:24px;transition:transform .2s}.bottom-nav-item span{font-size:11px;font-weight:500}.bottom-nav-item.active{color:var(--accent)}.bottom-nav-item.active svg{transform:scale(1.1)}.bottom-nav-item:active{opacity:.7}body.hide-bottom-nav .bottom-nav{display:none}#dashboard-screen,#constructor-screen{padding-bottom:calc(70px + env(safe-area-inset-bottom,0px))}#constructor-screen{background:var(--bg-primary)}.constructor-title{font-size:24px;font-weight:700}.constructor-content{padding:0 16px}.constructor-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:80px 20px}.constructor-placeholder-icon{width:100px;height:100px;background:var(--bg-secondary);border-radius:24px;display:flex;align-items:center;justify-content:center;margin-bottom:24px}.constructor-placeholder-icon svg{width:48px;height:48px;color:var(--accent);opacity:.7}.constructor-placeholder-title{font-size:20px;font-weight:600;margin-bottom:8px;color:var(--text-primary)}.constructor-placeholder-text{font-size:14px;color:var(--text-muted);max-width:240px}@media(max-height:700px){.summary-card{padding:10px;margin-bottom:10px}.summary-header{margin-bottom:8px}.calories-card{padding:10px;margin-bottom:8px;gap:10px}.calories-ring{width:54px;height:54px}.ring-center{font-size:11px}.calories-eaten{font-size:20px}.calories-eaten .calories-unit,.calories-sub{font-size:10px}.meta-value{font-size:11px}.calories-meta{margin-top:4px}.macros-grid{gap:4px}.macro-card{padding:8px 6px}.macro-card .macro-value{font-size:12px}.macro-card .macro-label{font-size:8px}.macro-card .macro-bar{margin-top:4px}.macro-card .macro-goal{font-size:9px;margin-top:3px}.meals-list{gap:6px}.meal-header{padding:8px 10px}.meal-icon{width:36px;height:36px;font-size:16px}.meal-add-btn{width:32px;height:32px}.expand-zone-header{height:18px}.collapse-zone{height:28px}}@media(max-width:380px){.dashboard-content{padding:0 12px 20px}.summary-card{padding:10px;margin-bottom:10px}.summary-header{margin-bottom:8px}.calories-card{padding:10px;margin-bottom:8px;gap:10px}.calories-ring{width:56px;height:56px}.ring-center{font-size:11px}.calories-eaten{font-size:20px}.calories-eaten .calories-unit{font-size:10px}.macros-grid{gap:4px}.macro-card{padding:8px 5px}.macro-card .macro-value{font-size:12px}.macro-card .macro-label{font-size:8px}.macro-card .macro-goal{font-size:9px}.meals-list{gap:8px}.meal-header{padding:8px 10px;gap:8px}.meal-icon{width:36px;height:36px;font-size:16px;border-radius:10px}.meal-name{font-size:13px}.meal-calories{font-size:14px}.meal-macros{font-size:9px}.meal-add-btn{width:32px;height:32px;border-radius:8px}.meal-add-btn svg{width:14px;height:14px}.items-wrapper{margin:0 8px;padding-top:8px}.meal-item{padding:8px 12px}.meal-item-name{font-size:12px}.meal-item-meta{font-size:10px}.meal-item-calories{font-size:12px}}@media(max-width:340px){.dashboard-header{padding:16px 12px 10px;padding-top:calc(48px + env(safe-area-inset-top,0px))}.dashboard-title{font-size:24px}.summary-card{padding:8px}.calories-card{padding:8px;gap:8px}.calories-ring{width:50px;height:50px}.ring-center{font-size:10px}.calories-eaten{font-size:18px}.calories-sub{font-size:9px}.meta-value{font-size:10px}.meta-label{font-size:9px}.macros-grid{gap:3px}.macro-card{padding:6px 4px}.macro-card .macro-value{font-size:11px}.macro-card .macro-label{font-size:7px}.macro-card .macro-goal{font-size:8px}.meal-icon{width:32px;height:32px;font-size:14px}.meal-badge{min-width:14px;height:14px;font-size:8px}.meal-stats{gap:6px}.meal-macros{display:none}}#photo-meal-screen{background:var(--bg-primary)}#photo-meal-screen.active{display:flex;flex-direction:column;height:100%}#photo-meal-screen .header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top,0px));background:var(--bg-secondary);border-bottom:1px solid var(--border);flex-shrink:0}#photo-meal-screen .header-title{font-size:17px;font-weight:600}.ai-input-tabs{display:flex;background:var(--bg-secondary);padding:8px 16px;gap:8px;position:relative;flex-shrink:0}.ai-input-tab{flex:1;padding:10px 16px;background:transparent;border:none;border-radius:10px;color:var(--text-muted);font-size:14px;font-weight:500;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .25s ease;position:relative;z-index:1}.ai-input-tab svg{width:18px;height:18px;transition:all .25s ease}.ai-input-tab.active{color:var(--text-primary)}.ai-input-tab[data-tab=voice].active{color:var(--voice-color)}.ai-input-tab[data-tab=photo].active{color:var(--accent)}.ai-input-tab-indicator{position:absolute;bottom:8px;height:calc(100% - 16px);background:var(--bg-tertiary);border-radius:10px;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:0}.ai-input-swipe-container{flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;position:relative}.ai-input-swipe-wrapper{display:flex;min-height:100%;transition:transform .3s cubic-bezier(.4,0,.2,1);will-change:transform}.ai-input-swipe-wrapper.swiping{transition:none}.ai-input-panel{flex:0 0 100%;width:100%}.panel-content{padding:16px}.voice-main-section{margin-bottom:20px}.voice-main-area{background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;padding:14px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;transition:all .2s}.voice-main-area.recording{border-color:var(--voice-color);background:var(--voice-dim)}.voice-main-btn{width:56px;height:56px;border-radius:50%;border:none;background:var(--voice-color);color:#000;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;margin-bottom:10px}.voice-main-btn:active{transform:scale(.95)}.voice-main-btn.recording{animation:voice-pulse 1.5s infinite}.voice-main-btn svg{width:24px;height:24px}.voice-main-hint{font-size:13px;color:var(--text-muted);transition:color .2s}.voice-main-hint.recording{color:var(--voice-color)}.voice-main-timer{font-size:24px;font-weight:600;color:var(--voice-color);margin-bottom:8px;font-variant-numeric:tabular-nums}.voice-main-result{display:none;background:var(--bg-secondary);border:1px solid var(--voice-color);border-radius:12px;padding:14px}.voice-main-result.active{display:block}.voice-text-divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--text-muted);font-size:12px}.voice-text-divider:before,.voice-text-divider:after{content:"";flex:1;height:1px;background:var(--border)}.voice-text-input{width:100%;background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;padding:14px;font-size:15px;color:var(--text-primary);font-family:inherit;resize:none;min-height:100px;outline:none;transition:border-color .2s;box-sizing:border-box}.voice-text-input:focus{border-color:var(--voice-color)}.voice-text-input::placeholder{color:var(--text-muted)}.voice-text-wrapper{position:relative}.voice-text-wrapper .voice-text-input{padding-right:44px}.voice-text-clear{position:absolute;right:8px;top:8px;width:32px;height:32px;padding:0;background:var(--bg-tertiary);border:none;border-radius:8px;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.voice-text-clear:active{background:#ef444426;color:var(--danger);transform:scale(.9)}.voice-text-clear svg{width:16px;height:16px}.voice-text-clear.hidden{display:none}.photo-upload-area{background:var(--bg-secondary);border:2px dashed var(--border);border-radius:16px;padding:40px 20px;text-align:center;cursor:pointer;transition:all .2s;margin-bottom:16px}.photo-upload-area:active{transform:scale(.98)}.photo-upload-area.has-photo{padding:0;border-style:solid;border-color:var(--accent);overflow:hidden}.photo-upload-icon{width:64px;height:64px;background:var(--bg-tertiary);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 16px}.photo-upload-icon svg{width:32px;height:32px;color:var(--text-muted)}.photo-upload-title{font-size:16px;font-weight:600;margin-bottom:4px}.photo-upload-hint{font-size:13px;color:var(--text-muted)}.photo-preview{width:100%;height:200px;object-fit:cover;display:block}.photo-preview-overlay{padding:12px;display:flex;justify-content:space-between;align-items:center;background:var(--bg-secondary)}.photo-preview-text{font-size:13px;color:var(--accent);display:flex;align-items:center;gap:6px}.photo-preview-text svg{width:16px;height:16px}.photo-change-btn{font-size:13px;color:var(--text-muted);background:none;border:none;cursor:pointer;text-decoration:underline}.photo-helper-section{margin-top:8px}.photo-helper-toggle{display:flex;background:var(--bg-secondary);border-radius:10px;padding:4px;margin-bottom:12px}.photo-helper-btn{flex:1;padding:8px 12px;background:transparent;border:none;border-radius:6px;color:var(--text-muted);font-size:13px;font-weight:500;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:all .2s}.photo-helper-btn svg{width:16px;height:16px}.photo-helper-btn.active{background:var(--bg-tertiary);color:var(--text-primary)}.photo-text-container,.photo-voice-container{display:block}.photo-text-container.hidden,.photo-voice-container.hidden{display:none}.prompt-label{font-size:13px;color:var(--text-muted);margin-bottom:8px;display:block}.prompt-textarea{width:100%;background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;padding:14px;font-size:15px;color:var(--text-primary);font-family:inherit;resize:none;min-height:80px;outline:none;transition:border-color .2s;box-sizing:border-box}.prompt-textarea:focus{border-color:var(--accent)}.prompt-textarea::placeholder{color:var(--text-muted)}.voice-input-area{background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;padding:24px;text-align:center;min-height:120px;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:all .2s}.voice-input-area.recording{border-color:var(--voice-color);background:var(--voice-dim)}.voice-btn{width:56px;height:56px;border-radius:50%;border:none;background:var(--bg-tertiary);color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;margin-bottom:10px}.voice-btn:active{transform:scale(.95)}.voice-btn.recording{background:var(--voice-color);color:#000;animation:voice-pulse 1.5s infinite}.voice-btn svg{width:24px;height:24px}@keyframes voice-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.05);opacity:.8}}.voice-hint{font-size:13px;color:var(--text-muted);transition:color .2s}.voice-hint.recording{color:var(--voice-color)}.voice-timer{font-size:24px;font-weight:600;color:var(--voice-color);margin-bottom:8px;font-variant-numeric:tabular-nums}.voice-result{display:none;background:var(--bg-secondary);border:1px solid var(--voice-color);border-radius:12px;padding:14px}.voice-result.active{display:block}.voice-result-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.voice-result-label{font-size:12px;color:var(--voice-color);display:flex;align-items:center;gap:6px}.voice-result-label svg{width:14px;height:14px}.voice-header-actions{display:flex;gap:8px}.voice-header-btn{width:32px;height:32px;padding:0;background:var(--bg-tertiary);border:none;border-radius:8px;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.voice-header-btn svg{width:16px;height:16px}.voice-header-btn:active{transform:scale(.9)}.voice-header-btn--danger:active{color:var(--danger);background:#ef444426}.voice-result-textarea{width:100%;min-height:60px;font-size:14px;color:var(--text-primary);line-height:1.5;padding:10px 12px;background:var(--bg-tertiary);border:1px solid transparent;border-radius:8px;resize:none;font-family:inherit;box-sizing:border-box;transition:border-color .2s,background .2s}.voice-result-textarea:focus{outline:none;border-color:var(--voice-color);background:var(--bg-primary)}.voice-result-textarea::placeholder{color:var(--text-muted)}.ai-input-common{padding:16px 16px 100px}.additional-section{margin-top:0}.additional-divider{display:flex;align-items:center;gap:12px;margin-bottom:12px;color:var(--text-muted);font-size:12px}.additional-divider:before,.additional-divider:after{content:"";flex:1;height:1px;background:var(--border)}.add-product-btn{width:100%;padding:12px;background:var(--bg-secondary);border:1px dashed var(--border);border-radius:12px;color:var(--text-muted);font-size:14px;font-weight:500;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s}.add-product-btn:active{transform:scale(.98)}.add-product-btn svg{width:18px;height:18px}.additional-products{background:var(--bg-secondary);border-radius:12px;overflow:hidden;margin-top:12px}.additional-products.hidden{display:none}.additional-products-header{padding:12px 14px;font-size:12px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.additional-products-count{background:var(--accent-dim);color:var(--accent);padding:2px 8px;border-radius:10px;font-size:11px}.additional-product-item{display:flex;align-items:center;padding:12px 14px;border-bottom:1px solid var(--border)}.additional-product-item:last-child{border-bottom:none}.additional-product-icon{font-size:20px;margin-right:12px;width:24px;text-align:center}.additional-product-info{flex:1;min-width:0}.additional-product-name{font-size:14px;font-weight:500;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.additional-product-details{font-size:12px;color:var(--text-muted)}.additional-product-remove{width:32px;height:32px;background:var(--bg-tertiary);border:none;border-radius:8px;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-left:8px;transition:color .2s}.additional-product-remove:active{color:var(--danger)}.additional-product-remove svg{width:16px;height:16px}.photo-meal-bottom-action{position:fixed;bottom:0;left:50%;transform:translate(-50%);width:100%;max-width:430px;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,var(--bg-primary) 20%);z-index:50}.analyze-btn{width:100%;padding:16px;background:var(--accent);border:none;border-radius:14px;color:#000;font-size:16px;font-weight:600;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:transform .2s,opacity .2s}.analyze-btn:disabled{opacity:.5;cursor:not-allowed}.analyze-btn:not(:disabled):active{transform:scale(.98)}.analyze-btn svg{width:20px;height:20px}.analyze-btn .spinner{width:20px;height:20px;border:2px solid rgba(0,0,0,.2);border-top-color:#000;border-radius:50%;animation:spin .8s linear infinite}:root{--voice-color: #f97316;--voice-dim: rgba(249, 115, 22, .15)}#voice-results-screen.active{display:flex;flex-direction:column;height:100%}.voice-results-content{flex:1;overflow-y:auto;padding:16px 16px 100px}.voice-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;text-align:center}.voice-loading-spinner{margin-bottom:24px}.voice-loading-spinner .spinner{width:48px;height:48px}.voice-loading-text{font-size:16px;font-weight:500;color:var(--text-primary);margin-bottom:8px}.voice-loading-subtext{font-size:13px;color:var(--text-muted)}.voice-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;text-align:center}.voice-error-icon{width:64px;height:64px;background:#ff475726;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:20px}.voice-error-icon svg{width:32px;height:32px;color:var(--danger)}.voice-error-text{font-size:15px;color:var(--text-muted);margin-bottom:20px}.voice-results-list{display:flex;flex-direction:column;gap:12px}.voice-product-card{background:var(--bg-secondary);border-radius:12px;padding:12px;transition:all .2s}.voice-product-card.estimated{border:2px dashed var(--border)}.voice-product-card.estimated .voice-product-badge{display:flex}.voice-product-card.estimated .voice-product-icon{background:#ffc10726}.voice-product-card.estimated .voice-product-icon svg{color:var(--warning)}.voice-product-header{display:flex;align-items:flex-start;gap:12px;margin-bottom:10px}.voice-product-icon{width:40px;height:40px;background:var(--accent-dim);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.voice-product-icon svg{width:20px;height:20px;color:var(--accent)}.voice-product-info{flex:1;min-width:0}.voice-product-name{font-size:14px;font-weight:500;margin-bottom:2px;display:flex;align-items:center;gap:8px}.voice-product-badge{display:none;font-size:10px;padding:2px 6px;background:#ffc10733;color:var(--warning);border-radius:4px;font-weight:600;text-transform:uppercase;letter-spacing:.3px}.voice-product-original{font-size:12px;color:var(--text-muted)}.voice-product-quantity{font-size:12px;color:var(--text-secondary);margin-top:2px}.voice-product-actions{display:flex;gap:6px;flex-shrink:0}.voice-product-replace-btn{width:32px;height:32px;border:none;background:var(--bg-tertiary);color:var(--text-secondary);border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.voice-product-replace-btn:hover{background:var(--accent-dim);color:var(--accent)}.voice-product-replace-btn svg{width:16px;height:16px}.voice-product-remove-btn{width:32px;height:32px;border:none;background:#ff475726;color:var(--danger);border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.voice-product-remove-btn:hover{background:#ff475740}.voice-product-remove-btn svg{width:16px;height:16px}.voice-product-nutrients{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;background:var(--bg-tertiary);border-radius:8px;padding:8px}.voice-nutrient{text-align:center}.voice-nutrient-value{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:500}.voice-nutrient-label{font-size:9px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.3px}.voice-nutrient.calories .voice-nutrient-value{color:var(--accent)}.voice-nutrient.protein .voice-nutrient-value{color:var(--protein)}.voice-nutrient.fat .voice-nutrient-value{color:var(--fat)}.voice-nutrient.carbs .voice-nutrient-value{color:var(--carbs)}.voice-results-totals{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;background:var(--bg-secondary);border-radius:12px;padding:12px;margin-top:16px}.voice-total-item{text-align:center}.voice-total-value{display:block;font-family:JetBrains Mono,monospace;font-size:18px;font-weight:600;color:var(--text-primary)}.voice-total-label{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px}.voice-total-item:nth-child(1) .voice-total-value{color:var(--accent)}.voice-total-item:nth-child(2) .voice-total-value{color:var(--protein)}.voice-total-item:nth-child(3) .voice-total-value{color:var(--fat)}.voice-total-item:nth-child(4) .voice-total-value{color:var(--carbs)}.voice-results-actions{position:fixed;bottom:0;left:0;right:0;padding:40px 16px 16px;background:linear-gradient(to top,var(--bg-primary) 80%,transparent)}.voice-results-actions .save-btn{width:100%;height:52px;background:var(--accent);color:#fff;border:none;border-radius:14px;font-size:16px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s}.voice-results-actions .save-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px #007aff4d}.voice-results-actions .save-btn:active{transform:translateY(0)}.voice-results-actions .save-btn svg{width:20px;height:20px}.voice-add-product-btn{width:100%;height:48px;margin-top:12px;background:var(--bg-secondary);border:2px dashed var(--border);border-radius:12px;color:var(--text-secondary);font-size:14px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s}.voice-add-product-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}.voice-add-product-btn svg{width:18px;height:18px}.voice-product-card{cursor:pointer}.voice-product-card:active{transform:scale(.98)}.voice-edit-modal{width:90%;max-width:340px}.voice-edit-product-name{font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:16px;text-align:center}.voice-edit-input-row{display:flex;gap:10px;margin-bottom:16px}.voice-edit-quantity{flex:1;height:48px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:10px;color:var(--text-primary);font-family:JetBrains Mono,monospace;font-size:18px;text-align:center;outline:none}.voice-edit-quantity:focus{border-color:var(--accent)}.voice-edit-unit{width:100px;height:48px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:10px;color:var(--text-primary);font-size:14px;padding:0 12px;outline:none;cursor:pointer}.voice-edit-unit:focus{border-color:var(--accent)}.voice-edit-preview{display:flex;justify-content:space-around;background:var(--bg-tertiary);border-radius:10px;padding:12px}.edit-preview-item{text-align:center;font-size:13px;color:var(--text-secondary)}.edit-preview-item span{display:block;font-family:JetBrains Mono,monospace;font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:2px}.edit-preview-item.kcal span{color:var(--accent)}.voice-edit-unit-text{display:flex;align-items:center;justify-content:center;width:100px;height:48px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:10px;color:var(--text-secondary);font-size:14px}#search-screen.active{display:flex;flex-direction:column;height:100%;background:var(--bg-primary)}#search-screen .header{flex-shrink:0}.search-container{position:relative;flex-shrink:0;z-index:100}.search-input-row{display:flex;align-items:center;gap:10px;padding:12px 16px}.search-page-input-wrap{flex:1;display:flex;align-items:center;gap:10px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;padding:12px 14px}.search-page-input-wrap.focused{border-color:var(--accent)}.search-page-input-wrap .search-icon{width:20px;height:20px;color:var(--text-muted);flex-shrink:0}.search-page-input-wrap input{flex:1;background:transparent;border:none;outline:none;font-size:16px;color:var(--text-primary);font-family:inherit;min-width:0}.search-page-input-wrap input::placeholder{color:var(--text-muted)}.search-page-clear{width:24px;height:24px;background:var(--bg-tertiary);border:none;border-radius:50%;color:var(--text-muted);cursor:pointer;display:none;align-items:center;justify-content:center;flex-shrink:0}.search-page-clear.visible{display:flex}.search-page-clear svg{width:12px;height:12px}.search-page-scan-btn{width:48px;height:48px;background:var(--accent);border:none;border-radius:12px;color:#000;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .2s}.search-page-scan-btn:active{transform:scale(.95);opacity:.8}.search-page-scan-btn svg{width:24px;height:24px}.search-dropdown{display:none;position:absolute;top:100%;left:0;right:0;background:var(--bg-primary);border-bottom:1px solid var(--border);max-height:calc(100vh - 180px);overflow:hidden;z-index:100}.search-dropdown.active{display:flex;flex-direction:column}.search-tabs{display:flex;gap:6px;padding:12px 16px;flex-shrink:0;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;border-bottom:1px solid var(--border)}.search-tabs::-webkit-scrollbar{display:none}.search-tab{flex:0 0 auto;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:500;background:var(--bg-secondary);border:1px solid var(--border);color:var(--text-muted);cursor:pointer;white-space:nowrap;transition:all .2s}.search-tab:active{transform:scale(.97)}.search-tab.active{background:var(--accent);border-color:var(--accent);color:#000}.search-dropdown-content{flex:1;overflow-y:auto;overflow-x:hidden}.search-tab-content{display:none}.search-tab-content.active{display:block}.search-dropdown-results{padding:12px 16px;display:flex;flex-direction:column;gap:8px}.search-page-content{flex:1;overflow-y:auto;overflow-x:hidden;padding:0 16px 16px}.search-selected-list{display:flex;flex-direction:column;gap:10px}.search-empty,.search-selected-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 20px;text-align:center;color:var(--text-muted)}.search-empty svg,.search-selected-empty svg{width:48px;height:48px;margin-bottom:16px;opacity:.5}.search-empty span,.search-selected-empty span{font-size:14px}.search-empty-hint{font-size:12px!important;margin-top:4px;opacity:.7}.search-loading{display:flex;justify-content:center;padding:32px}.search-result-item{padding:12px 14px;background:var(--bg-secondary);border-radius:12px;cursor:pointer;transition:all .15s}.search-result-item:active{transform:scale(.98);background:var(--bg-tertiary)}.search-result-top{display:flex;align-items:flex-start;gap:12px}.search-result-info{flex:1;min-width:0}.search-result-name{font-size:14px;font-weight:500;color:var(--text-primary);line-height:1.35;word-wrap:break-word;overflow-wrap:break-word}.search-result-brand-row{display:flex;align-items:center;gap:6px;margin-top:4px}.search-result-brand{font-size:12px;color:var(--text-muted)}.search-result-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 6px;border-radius:4px;font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.3px}.search-result-tag-ai{background:#818cf826;color:var(--ai)}.search-result-tag-dish{background:#c4b5fd26;color:var(--dish)}.search-result-kcal-block{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0;min-width:45px}.search-result-kcal{font-family:JetBrains Mono,monospace;font-size:16px;font-weight:600;color:var(--accent)}.search-result-kcal-label{font-size:10px;color:var(--text-muted)}.search-result-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.search-result-macros{display:flex;align-items:center;font-size:12px;color:var(--text-muted)}.search-result-macro-item{display:flex;align-items:center}.search-result-macro-letter{font-weight:600}.search-result-macro-value{margin-left:2px}.search-result-macro-sep{margin:0 5px;opacity:.5}.search-result-per100{font-size:10px;color:var(--text-muted);opacity:.6}.search-selected-card{background:var(--bg-secondary);border-radius:14px;padding:14px;transition:all .2s}.search-selected-header{display:flex;align-items:flex-start;gap:12px}.search-selected-icon{width:40px;height:40px;background:var(--accent-dim);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.search-selected-icon svg{width:20px;height:20px;color:var(--accent)}.search-selected-info{flex:1;min-width:0}.search-selected-name{font-size:14px;font-weight:500;color:var(--text-primary);margin-bottom:2px;display:flex;align-items:center;gap:6px}.search-selected-quantity{font-size:12px;color:var(--text-muted)}.search-selected-actions{display:flex;gap:6px}.search-selected-edit-btn,.search-selected-remove-btn{width:32px;height:32px;border:none;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}.search-selected-edit-btn{background:var(--bg-tertiary);color:var(--text-muted)}.search-selected-remove-btn{background:#ff475726;color:var(--danger)}.search-selected-edit-btn svg,.search-selected-remove-btn svg{width:16px;height:16px}.search-selected-nutrients{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.search-selected-nutrient{text-align:center}.search-selected-nutrient-value{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600}.search-selected-nutrient-label{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.3px}.search-selected-nutrient.calories .search-selected-nutrient-value{color:var(--accent)}.search-selected-nutrient.protein .search-selected-nutrient-value{color:var(--protein)}.search-selected-nutrient.fat .search-selected-nutrient-value{color:var(--fat)}.search-selected-nutrient.carbs .search-selected-nutrient-value{color:var(--carbs)}.search-totals{display:none;grid-template-columns:repeat(4,1fr);gap:8px;padding:12px 16px;background:var(--bg-secondary);border-top:1px solid var(--border);flex-shrink:0}.search-total-item{text-align:center}.search-total-value{font-family:JetBrains Mono,monospace;font-size:16px;font-weight:600;display:block}.search-total-label{font-size:10px;color:var(--text-muted);text-transform:uppercase}.search-total-item:first-child .search-total-value{color:var(--accent)}.search-total-item:nth-child(2) .search-total-value{color:var(--protein)}.search-total-item:nth-child(3) .search-total-value{color:var(--fat)}.search-total-item:nth-child(4) .search-total-value{color:var(--carbs)}.search-page-bottom-action{display:none;padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));background:var(--bg-primary);border-top:1px solid var(--border);flex-shrink:0}.search-page-bottom-action .save-btn{width:100%;padding:16px;background:var(--accent);color:#000;border:none;border-radius:14px;font-size:16px;font-weight:600;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .2s}.search-page-bottom-action .save-btn:active{transform:scale(.98)}.search-page-bottom-action .save-btn:disabled{opacity:.5;pointer-events:none}.search-page-bottom-action .save-btn svg{width:20px;height:20px}.search-overlay{display:none;position:fixed;inset:0;background:#00000080;z-index:50}.search-overlay.active{display:block}#search-page-scan-overlay{position:fixed;inset:0;background:#000000f2;z-index:10000;display:flex;align-items:center;justify-content:center}#search-page-scan-overlay .search-scan-container{position:relative;width:90%;max-width:400px;aspect-ratio:1}#search-page-scan-overlay .search-scan-container video{width:100%;height:100%;object-fit:cover;border-radius:16px}#search-page-scan-overlay .search-scan-frame{position:absolute;inset:15%;border:2px solid var(--accent);border-radius:12px;pointer-events:none}#search-page-scan-overlay .search-scan-frame:before{content:"";position:absolute;left:50%;transform:translate(-50%);width:60%;height:2px;background:var(--accent);animation:searchScanLine 2s infinite ease-in-out}@keyframes searchScanLine{0%,to{top:10%}50%{top:90%}}#search-page-scan-overlay .search-scan-close{position:absolute;top:16px;right:16px;width:44px;height:44px;background:#0009;border:none;border-radius:50%;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:10001}#search-page-scan-overlay .search-scan-close svg{width:24px;height:24px}.shared-view{min-height:100vh;background:var(--bg-primary);display:flex;flex-direction:column}.shared-header{padding:20px 16px;padding-top:calc(20px + env(safe-area-inset-top,0px));display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border-color, rgba(255, 255, 255, .1))}.shared-logo{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:600}.shared-logo .logo-icon{font-size:24px}.shared-badge{font-size:12px;padding:4px 10px;background:var(--bg-secondary);border-radius:12px;color:var(--text-muted)}.shared-loading{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:40px}.shared-loading-text{font-size:14px;color:var(--text-muted)}.shared-error{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:40px;text-align:center}.shared-error-icon{width:64px;height:64px;border-radius:50%;background:#ef44441a;display:flex;align-items:center;justify-content:center}.shared-error-icon svg{width:32px;height:32px;color:#ef4444}.shared-error-title{font-size:18px;font-weight:600;color:var(--text-primary)}.shared-error-text{font-size:14px;color:var(--text-muted);max-width:280px}.shared-content{flex:1;padding:16px 16px 100px}.shared-date{font-size:20px;font-weight:600;text-align:center;margin-bottom:20px;text-transform:capitalize}.shared-summary{margin-bottom:20px}.shared-summary .summary-header{padding-bottom:12px}.shared-meal .meal-add-btn{display:none!important}.shared-meal .meal-item{cursor:default}.shared-meal .meal-item:active{transform:none}.shared-meal .meal-item-remove,.shared-meal .delete-zone,.shared-meal .delete-btn{display:none!important}.shared-meal .collapse-zone .hint{display:none}.shared-footer{position:fixed;bottom:0;left:0;right:0;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px));background:linear-gradient(to top,var(--bg-primary) 80%,transparent)}.shared-cta{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px 24px;background:var(--accent-color, #22c55e);color:#fff;font-size:16px;font-weight:600;border-radius:12px;text-decoration:none;transition:transform .2s,opacity .2s}.shared-cta:active{transform:scale(.98);opacity:.9}.shared-cta svg{width:20px;height:20px}.header-btn.loading{opacity:.6;pointer-events:none}.header-btn.loading svg{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.share-modal{max-width:340px}.share-link-container{display:flex;gap:8px;margin-bottom:16px}.share-link-input{flex:1;padding:12px 14px;background:var(--bg-tertiary);border:1px solid var(--border-color, rgba(255, 255, 255, .1));border-radius:10px;color:var(--text-primary);font-size:13px;font-family:JetBrains Mono,monospace;outline:none}.share-link-input:focus{border-color:var(--accent-color, #22c55e)}.share-copy-btn{width:48px;height:48px;border-radius:10px;border:none;background:var(--bg-tertiary);color:var(--text-muted);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;flex-shrink:0}.share-copy-btn:active{transform:scale(.95);background:var(--accent-color, #22c55e);color:#fff}.share-copy-btn svg{width:20px;height:20px}.share-telegram-btn{width:100%;padding:14px 20px;background:#2aabee;color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer;transition:all .2s}.share-telegram-btn:active{transform:scale(.98);opacity:.9}.share-telegram-btn svg{width:22px;height:22px}.constructor-content{padding:16px;padding-bottom:calc(80px + env(safe-area-inset-bottom))}.constructor-header-section{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.constructor-header-section h2{font-size:16px;font-weight:600;color:var(--text-primary)}.create-dish-btn{display:flex;align-items:center;gap:8px;padding:10px 16px;background:linear-gradient(135deg,#f59e0b,#f97316);color:#fff;border:none;border-radius:12px;font-size:14px;font-weight:600;cursor:pointer;transition:transform .2s}.create-dish-btn:active{transform:scale(.97)}.create-dish-btn svg{width:18px;height:18px}.dishes-list{display:flex;flex-direction:column;gap:12px}.dish-tag{flex-shrink:0;font-size:9px;font-weight:700;padding:2px 5px;background:linear-gradient(135deg,#f59e0b,#f97316);color:#fff;border-radius:4px;letter-spacing:.5px}.dish-card-wrapper{display:flex;flex-direction:column;gap:0}.dish-main-card .dish-icon{background:linear-gradient(135deg,#f59e0b26,#f9731626)}.dish-main-card .dish-icon svg{color:#f59e0b}.dish-main-card{cursor:pointer}.dish-expand-btn{width:32px;height:32px;border:none;border-radius:8px;background:var(--bg-tertiary);color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .3s ease}.dish-expand-btn svg{width:16px;height:16px;transition:transform .3s ease}.dish-expand-btn.expanded svg{transform:rotate(180deg)}.dish-ingredients-container{max-height:0;overflow:hidden;transition:max-height .3s ease;margin-left:24px;border-left:2px solid var(--border);padding-left:12px}.dish-ingredients-container.visible{max-height:2000px;margin-top:12px}.dish-ingredients-list{display:flex;flex-direction:column;gap:10px}.ingredient-card{padding:12px}.ingredient-card .search-selected-icon{width:36px;height:36px}.ingredient-icon{background:var(--bg-tertiary)!important}.ingredient-icon svg{color:var(--text-muted)!important}.dish-bottom-actions{display:flex;gap:8px;margin-top:12px}.dish-edit-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;background:var(--bg-tertiary);color:var(--text-primary);border:none;border-radius:12px;font-size:14px;font-weight:600;cursor:pointer}.dish-edit-btn svg{width:18px;height:18px}.dish-save-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;background:linear-gradient(135deg,#f59e0b,#f97316);color:#fff;border:none;border-radius:12px;font-size:14px;font-weight:600;cursor:pointer}.dish-save-btn svg{width:18px;height:18px}.dish-delete-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:#ff475726;color:var(--danger);border:none;border-radius:12px;cursor:pointer}.dish-delete-btn svg{width:18px;height:18px}.dish-confirm-btn{display:flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(135deg,#f59e0b,#f97316)!important}.dish-confirm-btn svg{width:18px;height:18px}
