:root{--green:#145b43;--green2:#1d7754;--ink:#18352b;--muted:#718078;--line:#e7eee8;--paper:#f4f8f4;--gold:#e7a453;--red:#ae5542}*{box-sizing:border-box}html{min-height:100%;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}body{margin:0;min-height:100vh;padding-bottom:env(safe-area-inset-bottom);background:radial-gradient(ellipse at top,#eaf4eb 0,transparent 420px),var(--paper);font-size:16px;-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #75af8a;outline-offset:2px}.app{min-height:100vh}.topbar{height:70px;background:#ffffffed;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(18px,calc((100vw - 850px)/2));position:sticky;top:0;z-index:4;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:11px}.brand-icon{width:42px;height:42px;border-radius:13px}.brand-name{font-size:16px;font-weight:800;letter-spacing:-.25px}.brand-small{font-size:8px;letter-spacing:1.45px;font-weight:750;color:#829087;margin-top:3px}.top-actions{display:flex;align-items:center;gap:8px}.avatar,.settings-button{border:1px solid var(--line);border-radius:50%;background:#f7faf7;color:#466c55;height:40px;width:40px;display:grid;place-items:center;font-size:18px;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.settings-button{border-radius:12px;font-size:19px;color:#6f8076}.content{width:min(100% - 28px,760px);margin:0 auto;padding:22px 0 24px}.welcome{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 2px 19px}.eyebrow{font-size:9px;letter-spacing:1.6px;font-weight:850;color:#6d8c77;margin:0 0 6px}.welcome h1{font-size:24px;line-height:1.2;letter-spacing:-.65px;margin:0}.muted{color:var(--muted);font-size:13px;line-height:1.5;margin:7px 0 0}.online{display:flex;align-items:center;gap:7px;background:#edf6ef;padding:8px 10px;border-radius:999px;color:#548363;font-weight:700;font-size:10px;white-space:nowrap}.online i{width:7px;height:7px;border-radius:50%;background:#51a36f}.list-nav{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;margin:0 -2px 13px;padding:1px 2px 8px}.list-nav::-webkit-scrollbar{display:none}.list-pill{flex:0 0 auto;border:1px solid #e4ebe5;background:#fff;border-radius:999px;padding:0 13px;height:40px;display:flex;align-items:center;gap:8px;color:#53655a;box-shadow:0 2px 5px #29423208}.list-pill.selected{background:#e8f4eb;border-color:#cce4d1;color:#235a3c;font-weight:750}.pill-dot{width:8px;height:8px;border-radius:50%;background:#a7b8ab}.selected .pill-dot{background:#347b50}.pill-name{font-size:12px;white-space:nowrap}.pill-count{min-width:16px;color:#64836e;font-size:10px;font-weight:800}.shopping-card{background:#fff;border:1px solid #e6ede7;border-radius:18px;box-shadow:0 8px 28px #2545320a;padding:20px 18px 17px}.list-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:0 1px 14px}.list-heading h2{font-size:19px;letter-spacing:-.3px;margin:0}.list-caption{font-size:11px;color:#839087;margin:5px 0 0}.icon-action{border:1px solid #eef2ee;background:#fbfcfb;color:#929d94;border-radius:10px;width:36px;height:36px;font-size:20px;display:grid;place-items:center}.icon-action:hover{color:var(--red);background:#fff4f0}.add-product{border:1px solid #dce8df;background:#fafcf9;border-radius:13px;padding:6px;margin-bottom:13px}.add-product form{display:flex;align-items:center;gap:7px}.add-product input{min-width:0;flex:1;height:43px;padding:0 9px;border:0;background:transparent;outline:0;color:var(--ink);font-size:14px}.add-product input::placeholder{color:#9ba69e}.voice-button{height:39px;width:34px;flex:0 0 auto;border:0;border-radius:10px;background:transparent;color:#62816b;font-size:17px}.voice-button.active{background:#e8f4ea;color:#145b43;animation:voicepulse 1s ease infinite}@keyframes voicepulse{50%{box-shadow:0 0 0 5px #4a946329}}.new-quantity{height:40px;display:flex;align-items:center;border:1px solid #e2eae3;background:white;border-radius:10px;flex:0 0 auto}.new-quantity span{width:23px;text-align:center;font-size:13px;font-weight:750}.round-step{height:38px;width:34px;border:0;background:transparent;color:#538064;font-size:21px;border-radius:9px}.round-step:hover{background:#edf5ee}.add-button{height:40px;padding:0 13px;border:0;border-radius:10px;background:var(--green);color:#fff;font-size:12px;font-weight:750;white-space:nowrap}.add-button:hover,.primary:hover{background:#0c4934}.search-row{display:flex;align-items:center;gap:9px;padding:0 0 9px}.search-box{height:38px;flex:1;display:flex;align-items:center;gap:7px;border:1px solid #e8eee9;border-radius:10px;background:#fbfcfb;padding:0 10px;color:#839187}.search-box span{font-size:23px;line-height:1}.search-box input{min-width:0;width:100%;border:0;outline:0;background:transparent;font-size:12px;color:var(--ink)}.view-toggle{display:flex;gap:2px;background:#f0f4f0;border-radius:9px;padding:3px}.view-toggle button{height:30px;padding:0 9px;border:0;border-radius:7px;background:transparent;color:#77847b;font-size:10px;font-weight:700;white-space:nowrap}.view-toggle button.view-active{background:#fff;color:#3c6f4c;box-shadow:0 1px 4px #1e362313}.products{display:block}.product-row{min-height:55px;border-bottom:1px solid #edf1ed;display:flex;align-items:center;gap:10px;padding:5px 1px}.product-row:last-child{border-bottom:0}.check-button{height:25px;width:25px;flex:0 0 auto;border:1.5px solid #cedad0;border-radius:8px;background:white;color:transparent;display:grid;place-items:center;font-size:16px;font-weight:800;padding:0}.check-button:hover{border-color:#5b9a6e;background:#f4f9f4}.is-needed .check-button{background:#e8f4ea;border-color:#4d9363;color:#347850}.product-name{flex:1;min-width:0;font-size:14px;line-height:1.3;font-weight:580;color:#304239}.is-needed .product-name{font-weight:720;color:#1c4f35}.qty-control{height:34px;display:flex;align-items:center;border:1px solid #e8ede8;border-radius:9px;background:#fff;flex:0 0 auto}.qty-control button{height:32px;width:31px;border:0;background:transparent;color:#62816b;font-size:19px;border-radius:8px;padding:0}.qty-control button:hover{background:#f1f7f2}.qty-control span{width:23px;text-align:center;font-size:12px;font-weight:750;color:#4a5d4f}.product-delete{height:30px;width:27px;flex:0 0 auto;border:0;border-radius:8px;background:transparent;color:#abb5ad;font-size:20px;line-height:1}.product-delete:hover{color:var(--red);background:#fff1ed}.is-needed .product-delete{color:#bcb4a9}.add-list-link{margin:13px 1px 0;border:0;background:transparent;color:#34764f;font-weight:750;font-size:12px;padding:7px 3px}.add-list-link:hover{color:#145b43}.empty-state{text-align:center;padding:38px 12px}.empty-basket{width:43px;height:43px;margin:0 auto 11px;background:#edf6ee;color:#44825a;border-radius:14px;display:grid;place-items:center;font-weight:850;font-size:20px}.empty-state h3{font-size:14px;margin:0}.empty-state p{font-size:12px;color:#87938b;line-height:1.5;margin:6px auto 0;max-width:270px}.loading{padding:38px;text-align:center;color:#89968d;font-size:13px}.app-footer{display:flex;align-items:center;justify-content:space-between;color:#99a39b;font-size:10px;padding:14px 5px}.app-footer a{color:#718179;text-decoration:none}.app-footer a:hover{color:var(--green)}.toast{position:fixed;z-index:15;left:50%;bottom:calc(22px + env(safe-area-inset-bottom));transform:translate(-50%,12px);opacity:0;pointer-events:none;max-width:calc(100vw - 28px);padding:11px 15px;background:#193d2d;color:#fff;border-radius:12px;font-size:12px;box-shadow:0 8px 24px #13291f30;transition:opacity .18s,transform .18s}.toast.show{opacity:1;transform:translate(-50%,0)}.modal-backdrop{position:fixed;inset:0;z-index:10;background:#132a1f70;display:grid;place-items:center;padding:14px}.modal-backdrop[hidden]{display:none}.modal{width:min(100%,440px);max-height:min(90vh,820px);overflow:auto;background:#fff;border-radius:20px;padding:24px 21px calc(24px + env(safe-area-inset-bottom));position:relative;box-shadow:0 22px 60px #101d1650}.modal-x{position:absolute;right:13px;top:12px;width:36px;height:36px;border:0;border-radius:11px;background:#f4f7f4;color:#65746a;font-size:25px;line-height:1}.modal-icon{width:44px;height:44px;border-radius:14px;background:#eaf4ec;color:#407e55;display:grid;place-items:center;font-size:21px;margin-bottom:12px}.modal h2{font-size:20px;margin:0 0 17px}.modal h3{font-size:14px;margin:21px 0 10px}.field-label,.stack label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#68776e;font-weight:700;margin:13px 0}.field-label input,.stack input{height:43px;width:100%;border:1px solid #e2eae3;background:#fbfcfb;border-radius:10px;padding:0 11px;font-size:14px;color:var(--ink)}.field-label input[type=file]{height:auto;padding:10px;font-size:12px}.secondary-action{height:41px;border:1px solid #dce9df;background:#edf6ef;border-radius:10px;color:#2f7049;padding:0 13px;font-size:12px;font-weight:750}.photo-form{border-top:1px solid #edf1ed;margin-top:18px;padding-top:8px}.primary{height:44px;background:var(--green);color:#fff;border:0;border-radius:11px;font-weight:750;font-size:13px}.primary.wide{width:100%}.invite-form{border-top:1px solid #edf1ed;padding-top:8px;margin-top:12px}.tiny-note,.auth-note{color:#859188;font-size:10px;line-height:1.5}.user-row{display:flex;align-items:center;gap:6px;border-bottom:1px solid #edf1ed;padding:9px 0}.user-details{flex:1;min-width:0;display:grid;gap:3px}.user-details b{font-size:11px}.user-details small{font-size:10px;color:#88948b;overflow:hidden;text-overflow:ellipsis}.user-action{border:1px solid #e6ece7;background:#fff;border-radius:8px;padding:7px;color:#56735f;font-size:10px;font-weight:700;white-space:nowrap}.user-action.danger{color:#a85745}.logout-link{border:0;background:transparent;color:#829087;font-size:11px;margin-top:15px;padding:8px 0}.settings-message{font-size:11px;color:#407e55;min-height:18px;margin-top:10px}.modal hr{border:0;border-top:1px solid #edf1ed;margin:20px 0}.modal .stack label{font-size:10px}.auth-body{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(ellipse at 50% 0,#e9f3e9 0,transparent 460px),var(--paper)}.auth-card{width:min(100%,390px);background:white;border:1px solid var(--line);border-radius:21px;padding:25px 23px;box-shadow:0 10px 36px #20402d10}.auth-logo{width:53px;height:53px;border-radius:16px;margin-bottom:17px}.auth-card h1{font-size:23px;line-height:1.2;letter-spacing:-.45px;margin:0}.auth-card .muted{margin:8px 0 18px}.stack{display:grid;gap:2px}.stack label{font-size:11px}.stack .primary{margin-top:6px}.auth-note{margin:14px 0 0}.alert,.success{border-radius:10px;padding:10px 12px;margin:12px 0;background:#fff2ee;color:#a04d3c;font-size:11px;line-height:1.5}.success{background:#eef7ef;color:#34764b}.section-title{font-weight:800;font-size:11px;color:#3c5445}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:700px){.content{padding-top:33px}.shopping-card{padding:24px 25px 20px}.product-row{min-height:58px}.welcome h1{font-size:28px}}
@media(max-width:390px){.content{width:calc(100% - 20px)}.shopping-card{padding-left:13px;padding-right:13px}.welcome h1{font-size:22px}.online{font-size:9px;padding:7px 8px}.add-product form{gap:4px}.add-product input{font-size:13px}.new-quantity{height:38px}.round-step{width:30px}.add-button{padding:0 10px}.view-toggle button{padding:0 7px;font-size:9px}.qty-control button{width:27px}}

/* Formulario de alta más cómodo en pantallas táctiles. */
.add-product{padding:9px;margin-bottom:15px}
.add-product form{display:grid;grid-template-columns:44px max-content minmax(80px,1fr);grid-template-areas:"input input input" "voice quantity submit" "hint hint hint";gap:8px 10px}
.add-product input{grid-area:input;width:100%;height:48px;padding:0 12px;border:1px solid #e2eae3;border-radius:11px;background:#fff;font-size:16px}
.add-product input::placeholder{font-size:15px}
.voice-button{grid-area:voice;width:44px;height:44px;font-size:20px;border:1px solid #e2eae3;background:#fff}
.new-quantity{grid-area:quantity;height:44px}
.round-step{width:38px;height:42px;font-size:21px}
.add-button{grid-area:submit;height:44px;justify-self:stretch;padding:0 15px;font-size:14px}
.voice-hint{grid-area:hint;margin:0 2px 1px;color:#78867d;font-size:11px;line-height:1.4}
.product-name{font-size:15px;line-height:1.4}
.check-button{width:29px;height:29px}
.qty-control button{width:34px}
.qty-control span{font-size:13px}
.search-box input{font-size:14px}
@media(max-width:390px){.add-product{padding:8px}.add-product form{grid-template-columns:44px max-content minmax(74px,1fr);gap:8px}.add-product input{font-size:16px}.add-product input::placeholder{font-size:14px}.round-step{width:36px}.add-button{padding:0 10px;font-size:13px}.product-name{font-size:15px}.view-toggle button{font-size:10px}}

/* Verde intenso: nombres de listas más visibles en iPhone */
:root{--green:#075c43;--green2:#137151;--paper:#eef5ef;--line:#d9e6dc}
body{background:radial-gradient(ellipse at top,#e0eee3 0,transparent 440px),var(--paper)}
.list-pill{min-height:48px;padding:0 16px;border:1px solid #b9cdbf;background:#fff;color:#234b3b;box-shadow:0 2px 5px #17372f12}
.list-pill.selected{background:#075c43;border:2px solid #064a37;color:#fff;font-weight:800;box-shadow:0 3px 0 #043d2d}
.pill-name{font-size:15px;font-weight:750;letter-spacing:.05px}
.selected .pill-dot{background:#fff}
.pill-dot{width:9px;height:9px;background:#789484}
.pill-count{color:inherit;font-size:12px}
.list-heading h2{font-size:21px}
.product-name{font-size:16px;line-height:1.35}
@media(max-width:390px){.list-pill{min-height:48px;padding:0 14px}.pill-name{font-size:15px}.product-name{font-size:16px}}
