.dp-panel,.dp-picker { font:inherit; color:inherit; min-width:0 }
.dp-panel h3 { margin:0 0 10px; font:inherit; font-weight:700 }
.dp-gallery { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 12px }
.dp-gallery figure { margin:0; width:104px }
.dp-gallery a { display:block }
.dp-gallery img,.dp-staged img { display:block; border-radius:8px; background:#e8ece3 }
.dp-gallery img { width:104px; height:78px; object-fit:cover }
.dp-gallery figcaption,.dp-cover { font:inherit; font-size:12px; color:#315e4e }
.dp-cover { border:0; background:none; cursor:pointer; padding:4px 0; text-decoration:underline }
.dp-search figure > .dp-cover { display:block }
.dp-panel .dp-empty,.dp-panel .dp-status,.dp-picker .dp-status { margin:0; color:#52635a; font-size:13px }
.dp-actions { display:flex; flex-wrap:wrap; gap:8px }
.dp-picker .dp-btn { width:auto; margin:0; padding:8px 14px; min-height:38px; border-radius:7px; border:1px solid #abbcaf; background:#fffdf7; color:#254f40; font:inherit; font-size:14px; cursor:pointer }
.dp-picker .dp-primary { background:#254f40; border-color:#254f40; color:white }
.dp-picker button:disabled { opacity:.6; cursor:wait }
.dp-picker [hidden] { display:none!important }
.dp-staged { display:grid; gap:8px; margin-top:10px }
.dp-staged img { width:auto; height:auto; max-width:100%; max-height:240px; object-fit:contain }
.dp-panel .dp-status:not(:empty),.dp-picker .dp-status:not(:empty) { margin-top:7px }
.dp-reference { padding-bottom:16px; border-bottom:1px solid #d7e2d7; margin-bottom:16px; }
.dp-reference h3 { margin-bottom:5px; }
.dp-reference p { margin:4px 0; font-size:14px; overflow-wrap:anywhere; }
.dp-reference .dp-source,.dp-reference small { color:#54695d; font-size:12px; }
.dp-reference-images { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:6px 0; }
.dp-reference-images img { width:100%; aspect-ratio:4/3; object-fit:contain; background:#eef2eb; border:1px solid #d7e2d7; border-radius:8px; display:block; }
.dp-panel .dp-thumbnail { display:block; width:100%; padding:0; border:0; border-radius:8px; background:none; cursor:zoom-in }
.dp-viewer { box-sizing:border-box; width:min(960px,100%); height:min(850px,100%); max-height:100dvh; max-width:100vw; margin:auto; padding:12px; border:0; border-radius:12px; background:#17231e; color:white; overflow:hidden; }
.dp-viewer[open] { display:grid; grid-template-rows:auto minmax(0,1fr); gap:8px }
.dp-viewer::backdrop { background:rgba(10,17,14,.86) }
.dp-viewer header { display:flex; align-items:center; justify-content:space-between; gap:12px }
.dp-viewer strong { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis }
.dp-viewer button { flex:none; min-height:44px; padding:0 16px; border:0; border-radius:8px; font:inherit; font-weight:600; color:#183128; background:#fffdf7; cursor:pointer }
.dp-canvas { display:grid; place-items:center; grid-template:minmax(0,1fr)/minmax(0,1fr); min-height:0 }
.dp-canvas img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain }
@media (max-width:600px) {
  .dp-viewer { height:100dvh; border-radius:0; padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom)) }
}
.dp-panel [data-refs] { margin-top:16px; border-top:1px solid #d7e2d7; padding-top:12px }
.dp-panel [data-refs] h4 { margin:0 0 8px }
.dp-panel [hidden] { display:none!important }
.dp-gallery figcaption a { display:inline; color:inherit }
.dp-search { margin-top:10px }
.dp-search summary { cursor:pointer; font-weight:600; color:#254f40 }
.dp-search .dp-actions { margin:10px 0 }
.dp-search a { color:#315e4e }
.e-cover:has(.dp-origin),.dish-image:has(.dp-origin),.e-card-open:has(img[alt$="参考图"]) { position:relative }
.dp-origin,.e-card-open:has(img[alt$="参考图"])::after { position:absolute; top:4px; left:4px; background:#fffdf3; color:#315343; font:600 11px/1.4 sans-serif; border-radius:4px; padding:2px 5px }
.e-card-open:has(img[alt="视频参考图"])::after { content:"视频参考图" }
.e-card-open:has(img[alt="抖音图文参考图"])::after { content:"抖音图文参考图" }
.e-card-open:has(img[alt="网络参考图"])::after { content:"网络参考图" }
.dp-viewer[open] { grid-template-rows:auto minmax(0,1fr) auto auto }
.dp-viewer footer { display:flex; align-items:center; justify-content:center; gap:10px; color:#fff }
.dp-viewer footer button:disabled { opacity:.55 }
.dp-viewer [data-cover] { margin-left:auto }
.dp-viewer [hidden] { display:none!important }
.dp-view-error { color:white; margin:0 }
.dp-canvas { touch-action:pan-y pinch-zoom }
