:root{--bg: #f5f5f5;--surface: #fff;--text: #171717;--text-muted: #737373;--text-subtle: #a3a3a3;--border: #e5e5e5;--border-strong: #d4d4d4;--accent: #000;--accent-soft: #262626;--radius-sm: .5rem;--radius-md: .75rem;--radius-lg: 1rem;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);--shadow-md: 0 8px 24px rgba(0, 0, 0, .08);--control-bg: #f5f5f5;--header-bg: rgba(245, 245, 245, .88);--on-accent: #fff;--surface-muted: rgba(255, 255, 255, .72);background:var(--bg);color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,system-ui,sans-serif;line-height:1.35;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent}*{box-sizing:border-box}html{height:100%;overscroll-behavior:none}body{margin:0;min-height:100%;min-height:100dvh;background:var(--bg);overscroll-behavior:none;touch-action:manipulation}button,input{font:inherit}#root{min-height:100dvh}.app-shell{min-height:100dvh;display:flex;flex-direction:column;background:var(--bg)}.app-shell .header{position:sticky;top:0;z-index:10;margin-bottom:0;padding:calc(.85rem + env(safe-area-inset-top)) 1rem .85rem;background:var(--header-bg);border-bottom:1px solid var(--border);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}html.standalone .app-shell .header{padding-top:calc(.55rem + env(safe-area-inset-top))}.app{flex:1;max-width:640px;width:100%;margin:0 auto;padding:1rem 1rem calc(4.5rem + env(safe-area-inset-bottom))}.install-prompt{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem;padding:.75rem .85rem;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);box-shadow:var(--shadow-sm)}.install-prompt-ios{align-items:flex-start}.install-prompt-text{margin:0;font-size:.85rem;line-height:1.4;color:var(--text-muted)}.install-prompt-actions{display:flex;flex-shrink:0;gap:.35rem}.install-button{padding:.45rem .7rem;border:none;border-radius:var(--radius-sm);background:var(--accent);color:var(--on-accent);font-size:.8rem;font-weight:600;cursor:pointer}.install-dismiss{padding:.45rem .7rem;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--text-muted);font-size:.8rem;cursor:pointer}.header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.header h1{margin:0;font-size:1.35rem;font-weight:700;letter-spacing:-.02em}.header-meta{display:flex;flex-direction:column;align-items:flex-end;gap:.25rem}.header-actions{display:flex;align-items:center;gap:.45rem}.theme-toggle{display:grid;place-items:center;width:1.85rem;height:1.85rem;padding:0;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-muted);font-size:.95rem;line-height:1;cursor:pointer}.theme-toggle:active{background:var(--control-bg);color:var(--text)}.last-updated{font-size:.72rem;color:var(--text-subtle);font-variant-numeric:tabular-nums}.status{display:inline-flex;align-items:center;gap:.35rem;padding:.22rem .55rem;border:1px solid var(--border);border-radius:999px;background:var(--surface);font-size:.72rem}.status-label{color:var(--text-muted);font-weight:500}.status-connected+.status-label{color:var(--text)}.status-dot{width:.45rem;height:.45rem;border-radius:50%;flex-shrink:0}.status-connected{background:var(--accent)}.status-connecting{background:var(--text-subtle);animation:status-pulse 1s ease-in-out infinite}.status-disconnected{background:transparent;border:2px solid var(--text-subtle)}.status-unauthorized{background:var(--accent)}.login-overlay{min-height:100dvh;display:grid;place-items:center;padding:1rem;background:var(--bg)}.login-card{width:min(100%,360px);padding:1.35rem;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-md)}.login-card h1{margin:0 0 1rem;font-size:1.35rem;font-weight:700;letter-spacing:-.02em}.login-card form{display:grid;gap:.75rem}.login-card input{width:100%;padding:.75rem .85rem;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface)}.login-card input:focus{outline:none;border-color:var(--accent)}.login-card form button{padding:.75rem .85rem;border:none;border-radius:var(--radius-md);background:var(--accent);color:var(--on-accent);font-weight:600;font-family:inherit;font-size:1rem;cursor:pointer}.login-card form button:disabled{opacity:.4;cursor:not-allowed}.login-switch{margin:1rem 0 0;font-size:.85rem;color:var(--text-muted);text-align:center}.login-switch-button{padding:0;border:none;background:none;color:var(--text);font:inherit;font-weight:600;text-decoration:underline;cursor:pointer}.login-switch-button:disabled{opacity:.5;cursor:not-allowed}.login-error{margin:0;font-size:.85rem;color:var(--text-muted)}.push-error{margin:0;font-size:.82rem;line-height:1.4;color:var(--text-muted)}@keyframes status-pulse{50%{opacity:.35}}.add-form{display:flex;align-items:stretch;gap:.35rem;margin-bottom:1.25rem;padding:.35rem;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-sm)}.add-form input,.add-form select{min-width:0;padding:.75rem .5rem;border:none;border-radius:calc(var(--radius-lg) - .15rem);background:transparent;color:var(--text);font-family:inherit;font-size:1rem}.add-form-quantity{width:2.75rem;flex-shrink:0;text-align:center;font-variant-numeric:tabular-nums;-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.add-form-quantity::-webkit-outer-spin-button,.add-form-quantity::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.add-form-unit{width:4rem;flex-shrink:0;color:var(--text-muted)}.add-form-text{flex:1;padding-left:.35rem}.add-form input::placeholder{color:var(--text-subtle)}.add-form input:focus,.add-form select:focus{outline:none}.add-form button,.delete-button{border:none;cursor:pointer}.add-form button{flex-shrink:0;padding:.75rem .9rem;border-radius:calc(var(--radius-lg) - .15rem);background:var(--accent);color:var(--on-accent);font-weight:600}.add-form button:disabled{background:var(--border-strong);color:var(--text-muted);opacity:1;cursor:not-allowed}.quantity-stepper{display:inline-flex;align-items:center;gap:.15rem;padding:.2rem;border:1px solid var(--border);border-radius:999px;background:var(--control-bg)}.quantity-stepper-button{display:grid;place-items:center;width:1.85rem;height:1.85rem;padding:0;border:none;border-radius:999px;background:var(--surface);color:var(--text);font-size:1rem;line-height:1;cursor:pointer;box-shadow:var(--shadow-sm)}.quantity-stepper-button:disabled{opacity:.35;cursor:not-allowed;box-shadow:none}.quantity-stepper-button:active:not(:disabled){background:var(--border)}.quantity-stepper-value{display:grid;place-items:center;min-width:1.5rem;padding:0 .15rem;font-size:.88rem;font-weight:700;font-variant-numeric:tabular-nums;color:var(--text)}.quantity-stepper-inline{flex-shrink:0;border:none;background:transparent;box-shadow:none;padding:0;gap:.2rem}.quantity-stepper-inline .quantity-stepper-button{width:1.75rem;height:1.75rem;font-size:.95rem}.quantity-stepper-inline .quantity-stepper-value{min-width:1.35rem;font-size:.85rem}.delete-button:disabled,.item-main:disabled{opacity:.45;cursor:not-allowed}.list-section{margin-bottom:1.35rem}.list-section-stock{padding-top:.15rem}.section-heading{display:flex;align-items:center;gap:.45rem;margin:0 0 .65rem;font-size:.78rem;letter-spacing:.06em;text-transform:uppercase;font-weight:700;color:var(--text-muted)}.section-count{display:inline-grid;place-items:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:999px;background:var(--accent);color:var(--on-accent);font-size:.68rem;letter-spacing:0;line-height:1}.section-empty{margin:0;padding:.85rem .25rem;font-size:.88rem;line-height:1.45;color:var(--text-subtle)}.item-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.55rem}.item-row,.task-row{display:flex;align-items:center;gap:.65rem;touch-action:pan-y;padding:.55rem .55rem .55rem .85rem;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-sm)}.item-row-shop{-webkit-user-select:none;user-select:none}.item-drag-handle{display:grid;flex-shrink:0;place-items:center;width:2.75rem;align-self:stretch;margin:-.55rem 0 -.55rem -.85rem;padding-left:.15rem;border-radius:var(--radius-md) 0 0 var(--radius-md);color:var(--text-subtle);cursor:grab;touch-action:none}.item-drag-handle svg{fill:currentColor}.item-drag-handle:active{cursor:grabbing;color:var(--text);background:var(--control-bg)}.item-row-shop.dragging{z-index:2;border-color:var(--border-strong);box-shadow:var(--shadow-md)}.item-row-stock{border-style:dashed;border-color:var(--border-strong);background:var(--surface-muted)}.item-main{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;min-width:0;padding:.35rem 0;border:none;background:transparent;color:inherit;text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none}.item-main:active:not(:disabled){opacity:.65}.item-text{font-size:1rem;font-weight:600;letter-spacing:-.01em;word-break:break-word}.item-unit{font-size:.75rem;font-variant-numeric:tabular-nums;color:var(--text-muted)}.item-row-actions{display:flex;align-items:center;gap:.35rem;flex-shrink:0}.item-row-stock .delete-button,.task-row .delete-button{display:grid;place-items:center;width:1.75rem;height:1.75rem;padding:0;border:none;border-radius:999px;background:var(--control-bg);color:var(--text-muted);font-size:1rem;line-height:1}.item-row-stock .delete-button:active:not(:disabled),.task-row .delete-button:active:not(:disabled){color:var(--text);background:var(--border)}.item-row-stock .delete-button:disabled,.task-row .delete-button:disabled{opacity:.45}.tab-bar{position:fixed;left:0;right:0;bottom:0;z-index:10;display:flex;gap:.35rem;padding:.4rem .75rem calc(.4rem + env(safe-area-inset-bottom));background:var(--header-bg);border-top:1px solid var(--border);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.tab-bar-button{flex:1;display:flex;align-items:center;justify-content:center;gap:.4rem;min-height:2.75rem;padding:.5rem .75rem;border:none;border-radius:var(--radius-md);background:transparent;color:var(--text-muted);font-size:.9rem;font-weight:600;letter-spacing:-.01em;cursor:pointer;-webkit-user-select:none;user-select:none}.tab-bar-button.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}.tab-bar-button:active:not(:disabled){opacity:.65}.tab-bar-badge{display:inline-grid;place-items:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:999px;background:var(--accent);color:var(--on-accent);font-size:.68rem;font-variant-numeric:tabular-nums;line-height:1}.task-complete{display:grid;flex-shrink:0;place-items:center;width:1.85rem;height:1.85rem;padding:0;border:1px solid var(--border-strong);border-radius:999px;background:transparent;color:var(--text-subtle);font-size:.9rem;line-height:1;cursor:pointer}.task-complete:active:not(:disabled){background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.task-complete:disabled{opacity:.45;cursor:not-allowed}.task-main{flex:1;display:flex;flex-direction:column;gap:.15rem;min-width:0;padding:.25rem 0;border:none;background:transparent;color:inherit;text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none}.task-main:active:not(:disabled){opacity:.65}.task-title{font-size:1rem;font-weight:600;letter-spacing:-.01em;word-break:break-word}.task-meta{font-size:.78rem;line-height:1.35;color:var(--text-muted);word-break:break-word}.task-add-button{width:100%;margin-bottom:1.25rem;padding:.8rem 1rem;border:1px dashed var(--border-strong);border-radius:var(--radius-lg);background:var(--surface);color:var(--text-muted);font-size:.92rem;font-weight:600;cursor:pointer}.task-add-button:active:not(:disabled){color:var(--text);border-color:var(--text-subtle)}.task-add-button:disabled{opacity:.5;cursor:not-allowed}.task-form{display:flex;flex-direction:column;gap:.75rem;margin-bottom:1.25rem;padding:1rem;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-md)}.task-form-row{display:flex;flex-direction:column;gap:.35rem}.task-form-label{font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;font-weight:700;color:var(--text-muted)}.task-form-inline{display:flex;gap:.5rem}.task-form-number{width:5rem;flex-shrink:0}.task-form input,.task-form select{min-height:2.75rem;padding:.6rem .7rem;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--control-bg);color:var(--text);font-size:.95rem;font-family:inherit}.task-form select{flex:1;min-width:0}.task-form input:focus,.task-form select:focus{outline:none;border-color:var(--text-subtle)}.task-form-preview{margin:0;font-size:.82rem;line-height:1.45;color:var(--text-muted)}.task-form-actions{display:flex;justify-content:flex-end;gap:.5rem}.chip-row{display:flex;flex-wrap:wrap;gap:.35rem}.chip{padding:.45rem .75rem;border:1px solid var(--border-strong);border-radius:999px;background:transparent;color:var(--text-muted);font-size:.82rem;font-weight:600;font-family:inherit;cursor:pointer}.chip-active{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.task-identity{margin:1.5rem 0 0;font-size:.78rem;color:var(--text-subtle);text-align:center}.task-identity-button{padding:0;border:none;background:none;color:var(--text-muted);font:inherit;font-weight:600;text-decoration:underline;cursor:pointer}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #0a0a0a;--surface: #171717;--text: #f5f5f5;--text-muted: #a3a3a3;--text-subtle: #737373;--border: #262626;--border-strong: #404040;--accent: #fff;--accent-soft: #e5e5e5;--control-bg: #262626;--header-bg: rgba(10, 10, 10, .88);--on-accent: #000;--surface-muted: rgba(23, 23, 23, .72);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);--shadow-md: 0 8px 24px rgba(0, 0, 0, .45);color-scheme:dark}}:root[data-theme=dark]{--bg: #0a0a0a;--surface: #171717;--text: #f5f5f5;--text-muted: #a3a3a3;--text-subtle: #737373;--border: #262626;--border-strong: #404040;--accent: #fff;--accent-soft: #e5e5e5;--control-bg: #262626;--header-bg: rgba(10, 10, 10, .88);--on-accent: #000;--surface-muted: rgba(23, 23, 23, .72);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);--shadow-md: 0 8px 24px rgba(0, 0, 0, .45);color-scheme:dark}:root[data-theme=light]{color-scheme:light}.header-ai{border-color:var(--accent);color:var(--text)}.recipe-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;place-items:center;padding:1rem;background:#00000073;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);overflow-y:auto}.recipe-dialog{width:min(100%,420px);max-height:calc(100dvh - 2rem);overflow-y:auto;display:flex;flex-direction:column;gap:.85rem;padding:1.15rem;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-md)}.recipe-dialog-title{margin:0;font-size:1.05rem}.recipe-meta,.recipe-pantry-note,.recipe-waiting{margin:0;font-size:.82rem;color:var(--text-muted)}.recipe-notes{margin:0;font-size:.85rem;line-height:1.45}.recipe-dish,.recipe-servings{width:100%;min-height:2.75rem;padding:0 .75rem;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--control-bg);color:var(--text);font:inherit}.recipe-dish:focus,.recipe-servings:focus{outline:2px solid var(--accent);outline-offset:-1px}.recipe-field{display:flex;flex-direction:column;gap:.4rem}.recipe-field-row{flex-direction:row;align-items:center;justify-content:space-between}.recipe-field-row .recipe-servings{width:5rem}.recipe-label{font-size:.7rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted)}.recipe-slider{width:100%;height:2.25rem;accent-color:var(--accent);touch-action:manipulation;cursor:pointer}.recipe-slider-value{display:flex;flex-direction:column;gap:.15rem;margin:0;font-size:.85rem;font-weight:600}.recipe-slider-hint{font-size:.78rem;font-weight:400;color:var(--text-muted)}.recipe-progress{height:3px;border-radius:999px;background:linear-gradient(90deg,transparent,var(--accent),transparent);background-size:200% 100%;animation:recipe-progress 1.4s ease-in-out infinite}@keyframes recipe-progress{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.recipe-progress{animation:none;background:var(--accent)}}.recipe-error{margin:0;font-size:.82rem;color:var(--danger, #c0392b)}.recipe-subhead{margin:.35rem 0 0;font-size:.7rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted)}.recipe-ingredient-list{display:flex;flex-direction:column;gap:.3rem;margin:0;padding:0;list-style:none}.recipe-ingredient{display:grid;grid-template-columns:1fr auto;gap:0 .5rem;font-size:.88rem}.recipe-ingredient-amount{color:var(--text-muted);font-variant-numeric:tabular-nums}.recipe-ingredient-note{grid-column:1 / -1;font-size:.78rem;color:var(--text-muted)}.recipe-ingredient-list-have .recipe-ingredient-text{color:var(--text-muted);text-decoration:line-through}.recipe-method,.recipe-row-method{display:flex;flex-direction:column;gap:.4rem;margin:0;padding-left:1.1rem;font-size:.85rem;line-height:1.45}.recipe-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.25rem}.recipe-button,.recipe-dismiss{min-height:2.5rem;padding:0 1rem;border-radius:var(--radius-md);font:inherit;font-weight:600;cursor:pointer}.recipe-button{border:1px solid var(--accent);background:var(--accent);color:var(--accent-contrast, #fff)}.recipe-dismiss{border:1px solid var(--border);background:transparent;color:var(--text-muted)}.recipe-button:disabled,.recipe-dismiss:disabled{opacity:.6;cursor:default}.recipe-row{flex-direction:column;align-items:stretch;gap:0}.recipe-row-done .recipe-title{color:var(--text-muted);text-decoration:line-through}.recipe-row-head{display:flex;align-items:center;gap:.5rem}.recipe-check{flex:none;display:grid;place-items:center;width:1.6rem;height:1.6rem;border:1px solid var(--border);border-radius:999px;background:var(--control-bg);color:var(--text);font-size:.85rem;cursor:pointer}.recipe-main{flex:1;display:flex;flex-direction:column;gap:.1rem;min-width:0;padding:.1rem 0;border:none;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.recipe-title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recipe-sub{font-size:.76rem;color:var(--text-muted)}.recipe-chevron{flex:none;color:var(--text-muted);font-size:1.1rem;transition:transform .15s ease}.recipe-chevron-open{transform:rotate(90deg)}.recipe-row-body{display:flex;flex-direction:column;gap:.6rem;margin-top:.7rem;padding-top:.7rem;border-top:1px solid var(--border)}.recipe-row-notes{margin:0;font-size:.8rem;line-height:1.45;color:var(--text-muted)}.recipe-child-list{display:flex;flex-direction:column;gap:.15rem;margin:0;padding:0;list-style:none}.recipe-child-main{display:grid;grid-template-columns:1.25rem 1fr auto;align-items:center;gap:.5rem;width:100%;min-height:2.25rem;padding:0;border:none;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.recipe-child-check{color:var(--accent);font-size:.85rem}.recipe-child-amount{color:var(--text-muted);font-size:.82rem;font-variant-numeric:tabular-nums}.recipe-child-done .recipe-child-text{color:var(--text-muted);text-decoration:line-through}.recipe-method-toggle,.recipe-delete{align-self:flex-start;padding:.25rem 0;border:none;background:none;color:var(--text-muted);font:inherit;font-size:.8rem;text-decoration:underline;cursor:pointer}.recipe-delete{color:var(--danger, #c0392b)}
