.tasks-mode #list{display:grid;gap:4px;background:transparent;box-shadow:none;padding:0}
.tasks-mode #list .group-title{display:none}
.top,.card,.settings-modal-card,.main-menu-card,.scanner-card,.task-action-card{background:#f8fafc}
.add>input,.task-options select,.field input{background:#f5f8fb}
.tasks-mode #list .item{min-height:44px;padding:5px 9px;grid-template-columns:27px minmax(0,1fr) auto;gap:7px;border:1px solid #d7e2eb;border-left:3px solid #2696d1;border-radius:10px;background:#f7f9fc;box-shadow:0 2px 7px rgba(35,67,91,.05);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-y}
.tasks-mode #list,.tasks-mode #list *{user-select:none!important;-webkit-user-select:none!important;-webkit-touch-callout:none!important}
.tasks-mode #list input,.tasks-mode #list button{touch-action:manipulation}
.tasks-mode #list .item.done{opacity:.58}
.tasks-mode #list .check{width:20px;height:20px;border-radius:6px}
.tasks-mode #list .name{font-size:14.5px;font-weight:500;line-height:1.2;color:#385066}
.tasks-mode #list .meta{display:block;min-height:0;margin-top:1px;padding-left:0;font-size:11px;font-weight:400;color:#748496}
.tasks-mode #list .meta:empty{display:none}
.tasks-mode #list .meta:before,.tasks-mode #list .meta:after{display:none!important;content:none!important}
.tasks-mode #list .assignee{width:17px;height:17px;display:inline-grid;place-items:center;margin:0 0 0 5px;padding:0;border-radius:50%;background:#eef5fb;color:#244b66;font-size:10px;font-weight:400;line-height:1;vertical-align:-2px}
.tasks-mode #list .name .assignee~.assignee{display:none!important}
.tasks-mode #list .task-shared .assignee{background:#eee8fb;color:#704ca5}
.tasks-mode #list .item-actions{display:none}
.tasks-mode #list .item-actions button{width:35px;height:35px;padding:0;border-radius:10px}
.tasks-mode #list .item.task-long-press{transform:scale(.992);background:#f3f0ff;border-color:#a98ad5}
.task-action-sheet{display:none;position:fixed;z-index:190;inset:0;align-items:end;justify-content:center;padding:14px;background:rgba(16,36,58,.48)}
.task-action-sheet.open{display:flex}
.task-action-card{width:min(460px,100%);padding:10px;background:#f8fafc;border-radius:20px;box-shadow:0 20px 65px rgba(7,24,44,.32)}
.task-action-card h3{margin:5px 8px 10px;font-size:16px;color:#1d3b55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-action-card button{display:block;width:100%;min-height:48px;margin:5px 0;border:0;border-radius:13px;font-family:inherit;font-size:15px;font-weight:700;cursor:pointer}
.task-action-edit{background:#e3f3ff;color:#0876bd}
.task-action-delete{background:#ffe7eb;color:#c73550}
.task-action-cancel{background:#f1f4f7;color:#506174}
.task-deadline-alert{grid-template-columns:minmax(120px,220px)!important}
.full-screen-toggle{display:none!important}
.task-deadline-alert .task-deadline-note{display:none!important}
.avatar-setting-row .password-setting-icon{font-size:22px}
.avatar-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin-top:14px}
.avatar-choice{height:52px;border:2px solid transparent;border-radius:13px;background:#eff5fa;font-size:26px;cursor:pointer}
.avatar-choice.selected{border-color:#1688d4;background:#dff1ff;box-shadow:0 0 0 3px rgba(22,136,212,.12)}
@media(max-width:560px){.tasks-mode #list .item{grid-template-columns:27px minmax(0,1fr) auto}.avatar-grid{grid-template-columns:repeat(5,1fr)}}
@media(max-width:680px){
  .tasks-mode #list{gap:3px}
  .tasks-mode #list .item{min-height:40px;padding:4px 8px;grid-template-columns:25px minmax(0,1fr) auto;gap:6px;border-radius:9px}
  .tasks-mode #list .check{width:19px;height:19px}
  .tasks-mode #list .name{font-size:14px;line-height:1.15}
  .tasks-mode #list .meta{font-size:10.5px;line-height:1.1}
}
.theme-setting-row .password-setting-icon{font-size:20px;background:#e7eef8}
.theme-setting-row .theme-switch{width:44px;height:25px;position:relative;border-radius:99px;background:#bdcbd8;transition:.2s}
.theme-setting-row .theme-switch:after{content:"";position:absolute;width:19px;height:19px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(22,44,66,.25);transition:.2s}
.theme-setting-row.active .theme-switch{background:#7660b7}
.theme-setting-row.active .theme-switch:after{transform:translateX(19px)}
html[data-theme="dark"]{color-scheme:dark;--ink:#dce7f1;--muted:#9fb0c1;--paper:#172536;--line:#2c4053;--shadow:0 8px 28px rgba(0,0,0,.24)}
html[data-theme="dark"] body{color:#dce7f1;background:radial-gradient(circle at 8% 4%,rgba(109,82,170,.22),transparent 24%),radial-gradient(circle at 92% 8%,rgba(28,133,199,.18),transparent 28%),#0e1722}
html[data-theme="dark"] .top,html[data-theme="dark"] .card,html[data-theme="dark"] .settings-modal-card,html[data-theme="dark"] .main-menu-card,html[data-theme="dark"] .scanner-card,html[data-theme="dark"] .task-action-card,html[data-theme="dark"] .auth-card,html[data-theme="dark"] .admin-card{background:#172536;border-color:#2c4053;color:#dce7f1}
html[data-theme="dark"] .tabs{background:linear-gradient(90deg,#142b3c,#28213d)}
html[data-theme="dark"] .tab{color:#aebdca}
html[data-theme="dark"] .account{background:#203348;color:#d7e9f7;border-color:#334b61}
html[data-theme="dark"] .add,html[data-theme="dark"] .tasks-mode .add{background:linear-gradient(120deg,#172536 55%,#1b2d43)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .add>input,html[data-theme="dark"] .task-options select,html[data-theme="dark"] .field input{background:#101d2a!important;color:#e1ebf4!important;border-color:#344a5e!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#8293a5}
html[data-theme="dark"] .task-options{background:#211d30;border-color:#3b3150}
html[data-theme="dark"] .tasks-mode #list .item{background:#172536;border-color:#2d4357;border-left-color:#6f5bb0}
html[data-theme="dark"] #list .item{background:#172536;border-color:#2d4357}
html[data-theme="dark"] #list .item:nth-of-type(4n+2){background:#1a2a3a}
html[data-theme="dark"] #list .item:hover{background:#203449}
html[data-theme="dark"] #list .item.done{background:#121f2c}
html[data-theme="dark"] #list .item .name{color:#dce7f1}
html[data-theme="dark"] #list .amount-inline{background:#24445c;color:#a9ddff}
html[data-theme="dark"] .tasks-mode #list .name{color:#dce7f1}
html[data-theme="dark"] .tasks-mode #list .meta{color:#98aabc}
html[data-theme="dark"] .tasks-mode #list .assignee{background:#263b50;color:#e4edf6}
html[data-theme="dark"] .tasks-mode #list .task-shared .assignee{background:#352b4b;color:#d8c8f4}
html[data-theme="dark"] .item.done{background:#13202d}
html[data-theme="dark"] .password-setting-row,html[data-theme="dark"] .menu-choice,html[data-theme="dark"] .member-options-card{background:#1b2b3c;color:#dce7f1;border-color:#2f4559}
html[data-theme="dark"] .password-setting-row small,html[data-theme="dark"] .menu-choice small,html[data-theme="dark"] .settings-card>p,html[data-theme="dark"] .settings-modal-head p{color:#97a9ba}
html[data-theme="dark"] .password-setting-icon,html[data-theme="dark"] .theme-setting-row .password-setting-icon{background:#302849}
html[data-theme="dark"] .task-action-edit{background:#173a52;color:#7bc7f5}
html[data-theme="dark"] .task-action-delete{background:#44242d;color:#ff9cac}
html[data-theme="dark"] .task-action-cancel{background:#253545;color:#c4d0db}
html[data-theme="dark"] .fixed-market-row,html[data-theme="dark"] .market-search-result,html[data-theme="dark"] .nutrition-stat,html[data-theme="dark"] .ingredients{background:#1c2d3e;border-color:#30485d;color:#dce7f1}
html[data-theme="dark"] .auth-screen{background:#0e1722}
.shopping-sort-toggle{display:none;width:38px;height:38px;flex:0 0 38px;align-items:center;justify-content:center;margin-left:auto;border:1px solid #cfe0ec;border-radius:50%;background:#eef6fc;color:#17699f;padding:0;font-size:19px;font-weight:800;cursor:pointer}
.shell:not(.tasks-mode) .shopping-sort-toggle{display:inline-flex;align-items:center;gap:5px}
.shopping-sort-toggle .sort-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.shopping-sort-toggle.active{background:#0f6cbd;color:#fff;border-color:#0f6cbd}
.shopping-sort-toggle.sorting .sort-icon{animation:smart-sort-spin .38s ease}
@keyframes smart-sort-spin{50%{transform:rotate(180deg) scale(1.12)}100%{transform:rotate(360deg)}}
.sort-actions{display:none;gap:4px}
.shopping-sort-active #list .item-actions>.edit,.shopping-sort-active #list .item-actions>.delete{display:none!important}
.shopping-sort-active #list .sort-actions{display:flex}
.sort-actions button{width:32px;height:32px;border:0;border-radius:8px;background:#e4f2fc;color:#0f6cbd;font-size:18px;font-weight:800;cursor:pointer}
.sort-actions button:disabled{opacity:.3;cursor:default}
.shopping-sort-active #list .item{border-left-color:#0f6cbd;background:#f4f9fd}
html[data-theme="dark"] .shopping-sort-toggle{background:#1b3348;color:#9ed5f7;border-color:#355069}
html[data-theme="dark"] .shopping-sort-toggle.active{background:#176da9;color:#fff}
html[data-theme="dark"] .sort-actions button{background:#1c3b53;color:#8ed2fb}
html[data-theme="dark"] .shopping-sort-active #list .item{background:#172b3c}
:root{--ui-blue:#1678c8;--ui-purple:#7657b5;--ui-red:#cf4059;--ui-radius:10px;--ui-control:40px;--ui-gap:10px}
button,input,select,textarea{font-family:inherit}
.primary,.add>button,.menu-open,.scan-fields button,.fixed-market-add button,.market-search-box button,.current-market-save button{min-height:var(--ui-control);border-radius:var(--ui-radius);font-size:14px;font-weight:700;box-shadow:none}
.settings-grid{gap:12px}.settings-card,.archive-card{padding:18px}.settings-card h2,.archive-head h2{font-size:22px}.field{gap:5px;margin:10px 0}.field label,.details label{font-size:12px;font-weight:600}.password-setting-row{min-height:62px;border-radius:13px}.menu-choice{min-height:58px}
.shell>#addForm{display:none!important}
.task-add-toggle{display:block!important;height:40px;margin:0 0 10px;border-radius:10px;background:linear-gradient(135deg,#1678c8,#2899e8);font-size:14px;font-weight:700}
.tasks-mode .task-add-toggle{background:linear-gradient(135deg,#7657b5,#9c68cb)}
.add-sheet-overlay{display:none;position:fixed;z-index:185;inset:0;align-items:flex-end;justify-content:center;padding:18px;background:rgba(12,28,43,.52)}
.add-sheet-overlay.open{display:flex}
.add-sheet-card{width:min(620px,100%);max-height:min(86vh,720px);overflow:auto;padding:12px;background:#f8fafc;border:1px solid #d7e3ed;border-radius:20px;box-shadow:0 22px 70px rgba(7,24,44,.32)}
.add-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 3px 10px 7px}
.add-sheet-head h2{margin:0;font-size:18px;font-weight:650;color:#28445b}
.add-sheet-close{width:36px;height:36px;border:0;border-radius:9px;background:#e8eff5;color:#425b70;font-size:22px;cursor:pointer}
.add-sheet-card #addForm{display:grid!important;margin:0;padding:12px;border:0;border-radius:13px;box-shadow:none;background:#f1f6fa}
.add-sheet-card #addForm>button{border-radius:9px}
.amount-field{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:5px;align-items:center}
.amount-field #extra{width:100%!important}
.amount-times{height:38px;display:grid;place-items:center;border-radius:8px;background:#dcebf6;color:#315c7b;font-size:16px;font-weight:700}
.add-sheet-card.is-task-sheet .amount-times{display:none}
.add-sheet-card.is-task-sheet .amount-field{display:block}
.amount-inline{min-width:22px;margin-right:6px;padding:1px 5px;border-radius:6px;font-size:12px;font-weight:700}
html[data-theme="dark"] .add-sheet-card{background:#172536;border-color:#30475b}
html[data-theme="dark"] .add-sheet-head h2{color:#dce7f1}
html[data-theme="dark"] .add-sheet-close{background:#26394b;color:#dce7f1}
html[data-theme="dark"] .add-sheet-card #addForm{background:#132231}
html[data-theme="dark"] .amount-times{background:#254057;color:#c8e1f2}
html[data-theme="dark"] .toolbar h2,html[data-theme="dark"] .settings-card h2,html[data-theme="dark"] .archive-head h2,html[data-theme="dark"] .member strong{color:#dce7f1}
html[data-theme="dark"] .toolbar button:not(.shopping-sort-toggle){background:#352534;color:#f4a3b1}
html[data-theme="dark"] .role{background:#3b3321;color:#f0d68c}
html[data-theme="dark"] .product-row,html[data-theme="dark"] .member,html[data-theme="dark"] .archive-row{border-color:#2d4255}
html[data-theme="dark"] .empty,html[data-theme="dark"] .archive-empty,html[data-theme="dark"] .fixed-market-empty{color:#9fb0c1}
@media(max-width:680px){.add-sheet-overlay{padding:0}.add-sheet-card{width:100%;max-height:88vh;border-radius:20px 20px 0 0;padding:10px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}.add-sheet-card #addForm{padding:10px}.settings-card,.archive-card{padding:15px}}
.shopping-market-picker{display:none;align-items:center;gap:4px;margin-left:auto;padding:3px 5px;border:1px solid #cfe0ec;border-radius:9px;background:#eef6fc;color:#17699f}
.shell:not(.tasks-mode) .shopping-market-picker{display:inline-flex}
.shopping-market-picker strong{display:block;max-width:150px;padding:0 4px;font-size:12px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shopping-market-picker+.shopping-sort-toggle{margin-left:4px}
html[data-theme="dark"] .shopping-market-picker{background:#1b3348;color:#9ed5f7;border-color:#355069}
@media(max-width:680px){.shopping-market-picker{margin-left:0}.shopping-market-picker strong{max-width:112px}}
.member-options-card #memberResetForm>p{margin:0 0 10px;color:#617188;font-size:13px;line-height:1.4}
.member-options-card #memberResetForm .primary{margin-top:8px}
.member-reset-back{width:100%;min-height:40px;margin-top:8px;border:0;border-radius:10px;background:#edf2f6;color:#53677a;font-weight:700;cursor:pointer}
.member-options-card button:disabled,.settings-modal-card button:disabled{opacity:.55;cursor:wait}
html[data-theme="dark"] .member-options-card #memberResetForm>p{color:#9fb0c1}
html[data-theme="dark"] .member-reset-back{background:#26394b;color:#dce7f1}
.forgot-password-open{display:block;margin:10px auto 0;border:0;background:transparent;color:#0f6cbd;font-size:13px;font-weight:750;cursor:pointer}
.password-recovery-modal{display:none;position:fixed;z-index:240;inset:0;padding:16px;background:rgba(16,36,58,.58);place-items:center}
.password-recovery-modal.open{display:grid}
.password-recovery-card{width:min(430px,100%);padding:19px;background:#f8fafc;border:1px solid #d9e5ee;border-radius:18px;box-shadow:0 24px 70px rgba(7,24,44,.34)}
.password-recovery-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.password-recovery-head h2{margin:0;color:#28445b;font-size:22px}.password-recovery-head p{margin:5px 0 12px;color:#617188;font-size:13px;line-height:1.4}.password-recovery-close{width:36px;height:36px;flex:0 0 36px;border:0;border-radius:9px;background:#e8eff5;color:#425b70;font-size:22px;cursor:pointer}
.password-recovery-card form[hidden]{display:none}.password-recovery-card .auth-error{margin-top:12px}
html[data-theme="dark"] .password-recovery-card{background:#172536;border-color:#30475b}html[data-theme="dark"] .password-recovery-head h2{color:#dce7f1}html[data-theme="dark"] .password-recovery-head p{color:#9fb0c1}html[data-theme="dark"] .password-recovery-close{background:#26394b;color:#dce7f1}
