.dml-tabs{display:flex;gap:24px;margin:0 0 24px;border-bottom:1px solid var(--line);letter-spacing:0}
.dml-tabs button{min-height:44px;padding:10px 2px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--muted);font:inherit;font-weight:700}
.dml-tabs button[aria-selected="true"]{color:var(--text);border-bottom-color:var(--red)}
.diet-meal-library{min-width:0;letter-spacing:0;color:var(--text)}
.diet-meal-library *,.dml-picker *{box-sizing:border-box;letter-spacing:0}
.diet-meal-library h1{font-size:24px;line-height:1.2;margin:12px 0 0;overflow-wrap:anywhere}
.diet-meal-library h2,.dml-picker h2{font-size:16px;line-height:1.3;margin:0}
.diet-meal-library h3{font-size:15px;line-height:1.35;margin:0;overflow-wrap:anywhere}
.dml-heading,.dml-section-head,.dml-item header,.dml-footer,.dml-picker header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.dml-heading{margin-bottom:24px}
.diet-meal-library button,.dml-picker button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border-radius:6px;white-space:normal}
.diet-meal-library button svg,.dml-picker button svg{flex:none}
.diet-meal-library button:disabled{opacity:.5;cursor:wait}
.diet-meal-library button:hover:not(:disabled),.dml-picker button:hover{filter:brightness(1.12)}
.dml-tabs button:focus-visible,.diet-meal-library :focus-visible,.dml-picker :focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.diet-meal-library label,.dml-picker label{display:grid;gap:6px;min-width:0;font-size:13px}
.diet-meal-library input:not([type="checkbox"]),.diet-meal-library select,.dml-picker input{width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);font:inherit;caret-color:var(--red)}
.diet-meal-library input::placeholder,.dml-picker input::placeholder{color:var(--muted);opacity:1}
.diet-meal-library input[readonly]{color:var(--muted)}
.dml-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin:0 0 20px}
.dml-list{border-top:1px solid var(--line)}
.dml-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;padding:20px 0;border-bottom:1px solid var(--line)}
.dml-meta,.dml-nutrients{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:12px;color:var(--muted)}
.dml-meta{margin:8px 0}.dml-nutrients strong{font-variant-numeric:tabular-nums;color:var(--text);font-size:14px}
.dml-status.is-published{color:var(--green)}.dml-status.is-draft{color:var(--yellow)}
.dml-empty,.dml-loading{padding:36px 0;color:var(--muted);text-align:center}
.dml-loading{min-height:130px;display:grid;place-items:center}
.dml-error{border-left:1px solid var(--red);padding:8px 14px;margin:12px 0;background:var(--redsoft);color:var(--text)}
.dml-error ul{margin:0;padding-left:16px}.dml-more{margin-top:20px}
.dml-editor-fields{border:0;padding:0;margin:0;min-width:0}
.dml-section{padding:24px 0;border-top:1px solid var(--line)}
.dml-section h2{margin-bottom:16px}.dml-section-head h2{margin:0}.dml-section-head{margin-bottom:16px}
.dml-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(160px,1fr);gap:16px}
.dml-types{display:flex;gap:4px 20px;flex-wrap:wrap;padding:0;margin:20px 0 0;border:0}
.dml-types legend{font-size:13px;margin-bottom:8px}
.dml-types label,.dml-review{display:flex!important;align-items:center;gap:10px!important;min-height:44px}
.dml-types input,.dml-review input{flex:none;width:18px;height:18px;accent-color:var(--red);margin:0}
.dml-item{padding:20px 0;border-bottom:1px solid var(--line)}
.dml-item header{margin-bottom:16px}.dml-item header span{display:block;margin-top:6px;font-size:12px;color:var(--muted)}
.dml-icon{width:44px;padding:0;flex:none}
.dml-portion{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.dml-safety{margin-top:18px}.dml-safety summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:600;font-size:13px}
.dml-safety summary span{margin-left:12px;color:var(--muted);font-size:12px;font-weight:400}
.dml-safety-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:10px 0}
.dml-wide{grid-column:1/-1}.dml-review{margin:14px 0 0;align-items:flex-start!important;padding:10px 0;max-width:72ch}
.dml-linked{display:grid;gap:6px;font-size:13px}.dml-linked strong{font-weight:500;overflow-wrap:anywhere}
.dml-review span{line-height:1.5}.dml-ingredient-actions{margin:8px 0}.dml-ingredient-list{display:flex;flex-wrap:wrap;gap:8px}
.dml-ingredient-list button{overflow-wrap:anywhere;word-break:break-all;max-width:100%;font-size:11px}
.dml-footer{padding:20px 0;border-top:1px solid var(--line)}.dml-footer h2{margin-bottom:10px}
.dml-back{padding:6px 0!important;border:0!important;background:transparent!important}.dml-version,.dml-muted{color:var(--muted);font-size:12px}
.dml-picker{width:min(600px,calc(100% - 24px));max-height:85dvh;padding:22px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);overflow:auto;scrollbar-color:var(--muted) transparent}
.dml-picker::backdrop{background:var(--overlay)}.dml-picker header{margin-bottom:22px}
.dml-food-result{display:flex!important;justify-content:space-between!important;width:100%;min-width:0;padding:14px 0;border:0;border-bottom:1px solid var(--line);border-radius:0!important;background:transparent;color:var(--text);text-align:left}
.dml-food-result span{min-width:0;overflow-wrap:anywhere}.dml-food-result small{display:block;color:var(--muted);margin-top:4px}
.dml-substitution{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.dml-substitution span{min-width:0;overflow-wrap:anywhere}
.dml-sub-choice{display:flex!important;align-items:center;gap:12px!important;min-height:64px;padding:12px 0;border-bottom:1px solid var(--line);cursor:pointer}
.dml-sub-choice input{width:18px!important;min-height:18px!important;flex:none;accent-color:var(--red)}
.dml-sub-choice span{min-width:0;overflow-wrap:anywhere}.dml-sub-choice small{display:block;color:var(--muted);margin-top:4px}
.dml-picker-footer{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:20px}.dml-picker-footer [hidden]{display:none}
@media(max-width:600px){.dml-heading{align-items:flex-start;gap:12px}.diet-meal-library h1{font-size:21px}.dml-fields,.dml-safety-fields{grid-template-columns:1fr}.dml-portion{grid-template-columns:repeat(2,minmax(0,1fr))}.dml-row{grid-template-columns:1fr;gap:12px}.dml-row>button{justify-self:start}.dml-footer{align-items:stretch;flex-direction:column}.dml-section-head{align-items:flex-start;flex-direction:column}.dml-heading>.admin-primary{font-size:12px;padding:10px}.dml-picker{padding:16px}.dml-nutrients{gap:6px 12px}.dml-search{gap:8px}.dml-search button{padding:10px}.dml-wide{grid-column:auto}}
